[coreboot-gerrit] Patch set updated for coreboot: 0c93eb8 crossgcc: don't use libdl while building GDB on FreeBSD
Stefan Reinauer (stefan.reinauer@coreboot.org)
gerrit at coreboot.org
Fri Mar 27 21:51:29 CET 2015
Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2342
-gerrit
commit 0c93eb8b5dc8a85710c2e83f793fdcd0bdd8cbe1
Author: Idwer Vollering <vidwer at gmail.com>
Date: Sat Feb 9 23:58:06 2013 +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 at gmail.com>
---
util/crossgcc/buildgcc | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index fde8bc6..5255a28 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -583,11 +583,19 @@ printf "Building GDB ${GDB_VERSION} ... "
cd ${BUILDDIRPREFIX}-gdb
export PYTHONHOME=$DESTDIR$TARGETDIR
rm -f .failed
+ if [ $(uname) = "FreeBSD" -o $(uname) = "NetBSD" ]; then
LDFLAGS="-Wl,-rpath,\$\$ORIGIN/../lib/ -L$DESTDIR$TARGETDIR/lib \
- -lpthread -ldl -lutil" \
+ -lpthread -lutil" \
CC="$CC" CFLAGS="$HOSTCFLAGS -I$DESTDIR$TARGETDIR/include" \
../gdb-${GDB_VERSION}/configure --prefix=$TARGETDIR \
--target=${TARGETARCH} --disable-werror --disable-nls
+ else
+ LDFLAGS="-Wl,-rpath,\$\$ORIGIN/../lib/ -L$DESTDIR$TARGETDIR/lib \
+ -lpthread -ldl -lutil" \
+ CC="$CC" CFLAGS="$HOSTCFLAGS -I$DESTDIR$TARGETDIR/include" \
+ ../gdb-${GDB_VERSION}/configure --prefix=$TARGETDIR \
+ --target=${TARGETARCH} --disable-werror --disable-nls
+ fi
$MAKE $JOBS || touch .failed
$MAKE install DESTDIR=$DESTDIR || touch .failed
if [ ! -f .failed ]; then touch .success; fi
More information about the coreboot-gerrit
mailing list