From 74caece74410f44aa8687054ca331d0e718b6aa4 Mon Sep 17 00:00:00 2001 From: John Marino Date: Mon, 9 Jul 2012 19:59:01 +0200 Subject: [PATCH] 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 libcairo.so.2 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. --- lib/libc/i386/gen/Makefile.inc | 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 diff --git a/lib/libc/i386/gen/Makefile.inc b/lib/libc/i386/gen/Makefile.inc index c519a07..9d0fbbd 100644 --- a/lib/libc/i386/gen/Makefile.inc +++ b/lib/libc/i386/gen/Makefile.inc @@ -1,10 +1,8 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 # $FreeBSD: src/lib/libc/i386/gen/Makefile.inc,v 1.10.2.1 2001/02/07 00:12:45 peter Exp $ -# $DragonFly: src/lib/libc/i386/gen/Makefile.inc,v 1.6 2007/01/16 07:16:23 dillon Exp $ SRCS+= fpclassifyl.c infinityl.c isfinitel.c isinfl.c isnanl.c \ ldexp.c makecontext.c nanf.c signbitl.c \ - _gcc_hack.c \ _ctx_start.S _setjmp.S alloca.S fabs.S flt_rounds.S fpgetmask.S \ fpgetround.S \ fpgetsticky.S fpsetmask.S fpsetround.S fpsetsticky.S mcontext.S modf.S \ diff --git a/lib/libc/i386/gen/_gcc_hack.c b/lib/libc/i386/gen/_gcc_hack.c deleted file mode 100644 index feb7785..0000000 --- a/lib/libc/i386/gen/_gcc_hack.c +++ /dev/null @@ -1,4 +0,0 @@ - -#include - -__weak_reference(__popcountsi2, __popcountSI2); -- 1.7.7.2