git: Libc: Remove i386 gcc hack concerning popcountsi2

John Marino marino at
Tue Jul 10 10:49:58 PDT 2012

commit 74caece74410f44aa8687054ca331d0e718b6aa4
Author: John Marino <draco at>
Date:   Mon Jul 9 19:59:01 2012 +0200

    Libc: Remove i386 gcc hack concerning popcountsi2
    Ref: 0cfd7e44b3676f6a43164acab0aaea46365b5c53
    Ref: 4b548429247a10382073a0c227af306272160d8d
    Back in Oct 2010, a "horrible hack" was added to libc in order to fix a
    Firefox bug concerning a late dynamic link of a symbol.  A
    weak reference to popcountsi2 was added to i386 libc in order to force it
    to be available.
    Up through gcc 4.6, this hack worked because the symbol is global in the
    libgcc.a library, but it's a hidden symbol starting with the gcc 4.7
    version of libgcc.a.  This causes a build failure on bin/rmail while
    building world with gcc 4.7.
    Since Oct 2010, rtld has undergone significant changes.
    With the hope that the issue is obsolete, the hack is being removed.
    This allows gcc 4.7 to compile DragonFly world and kernel source.
    We'll have to track firefox manually to verify the issue the hack fixed
    doesn't return.

Summary of changes:
 lib/libc/i386/gen/ |    2 --
 lib/libc/i386/gen/_gcc_hack.c  |    4 ----
 2 files changed, 0 insertions(+), 6 deletions(-)
 delete mode 100644 lib/libc/i386/gen/_gcc_hack.c

DragonFly BSD source repository

More information about the Commits mailing list