Idwer Vollering (vidwer@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2342
-gerrit
commit a1dad5e2a1b562154f99031dc96c50777d044b46 Author: Idwer Vollering vidwer@gmail.com Date: Sun Mar 29 01:52:03 2015 +0100
crossgcc: don't use libdl while building GDB on FreeBSD
crossgcc: fix building GDB on FreeBSD (and possibly NetBSD/OpenBSD).
Since FreeBSD doesn't have libdl, these errors are shown: - config.log: /usr/bin/ld: cannot find -ldl - crossgcc-build.log: configure: error: C compiler cannot create executables
Conditionally remove -ldl from LDFLAGS.
Change-Id: I79c48da7e6700a4606c9e0c1314241db8997d3f3 Signed-off-by: Idwer Vollering vidwer@gmail.com --- util/crossgcc/buildgcc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index fde8bc6..2dfc36d 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -583,8 +583,11 @@ printf "Building GDB ${GDB_VERSION} ... " cd ${BUILDDIRPREFIX}-gdb export PYTHONHOME=$DESTDIR$TARGETDIR rm -f .failed + if [ $(uname) != "FreeBSD" -a $(uname) != "NetBSD" ]; then + LIBDL="-ldl" + fi LDFLAGS="-Wl,-rpath,$$ORIGIN/../lib/ -L$DESTDIR$TARGETDIR/lib \ - -lpthread -ldl -lutil" \ + -lpthread $LIBDL -lutil" \ CC="$CC" CFLAGS="$HOSTCFLAGS -I$DESTDIR$TARGETDIR/include" \ ../gdb-${GDB_VERSION}/configure --prefix=$TARGETDIR \ --target=${TARGETARCH} --disable-werror --disable-nls