summaryrefslogtreecommitdiff
path: root/binary/linux-gnu
diff options
context:
space:
mode:
Diffstat (limited to 'binary/linux-gnu')
-rw-r--r--binary/linux-gnu/NOTES16
-rwxr-xr-xbinary/linux-gnu/binutils-configure5
-rwxr-xr-xbinary/linux-gnu/build-gcc13
-rwxr-xr-xbinary/linux-gnu/gcc-configure14
-rwxr-xr-xbinary/linux-gnu/odb-configure2
5 files changed, 27 insertions, 23 deletions
diff --git a/binary/linux-gnu/NOTES b/binary/linux-gnu/NOTES
index 69a4b8a..8c69e58 100644
--- a/binary/linux-gnu/NOTES
+++ b/binary/linux-gnu/NOTES
@@ -1,12 +1,10 @@
-* Need both binutils and GCC.
-
-* @@ This has been fixed, can go back to disabled NLS.
+* Use previous version of g++ to build the next (i.e., export PATH=/i686...).
- Had to enable NLS (--enable-nls) for GCC 4.7.3. When disabled there
- were some errors during plugin compilation in libintl.h (looked like
- plugin headers assumed NLS is enabled while libstdc++ (locale) assumed
- it was disabled so provided some dummy macros for gettext, etc.)
+* For some reason g++, cc1plus don't depend on dynamic libstdc++. If that
+ changes, then we will need to switch to the Mac OS way.
-TODO:
+* Cannot get 64-bit build of GCC to install into lib/. As a workaround,
+ pre-creating lib and lib64 as a link to it (this way, if we need to
+ rely on LD_LIBRARY_PATH setup in the driver, it will work).
-* Install plugin/gcc into lib64/ instead of lib/ for 64-bit binary.
+* Need both binutils and GCC.
diff --git a/binary/linux-gnu/binutils-configure b/binary/linux-gnu/binutils-configure
index c3b526f..2ac2b04 100755
--- a/binary/linux-gnu/binutils-configure
+++ b/binary/linux-gnu/binutils-configure
@@ -1,7 +1,8 @@
#! /bin/sh
-../../binutils-2.20.51/configure \
---disable-nls \
+../binutils-2.20.51/configure \
+--enable-nls \
+--disable-multiarch \
--prefix=/$1 \
--build=$1 \
--host=$1 \
diff --git a/binary/linux-gnu/build-gcc b/binary/linux-gnu/build-gcc
index 75131e1..0f4815d 100755
--- a/binary/linux-gnu/build-gcc
+++ b/binary/linux-gnu/build-gcc
@@ -12,7 +12,7 @@ function error ()
echo "$*" 1>&2
}
-arhc=x86_64-linux-gnu
+arch=x86_64-linux-gnu
rebuild=n
while [ $# -gt 0 ]; do
@@ -44,6 +44,11 @@ if [ $rebuild = y ]; then
rm -rf binutils-build/*
rm -rf gcc-build/*
rm -rf /$arch/*
+
+ if [ $arch = "x86_64-linux-gnu" ]; then
+ mkdir /$arch/lib
+ ln -s lib /$arch/lib64
+ fi
fi
# Build binutils
@@ -60,7 +65,7 @@ cd ..
# Remove installed binutils libraries.
#
-rm -r /$arch/lib /$arch/include
+rm -rf /$arch/lib/* /$arch/include/*
# Build gcc
#
@@ -75,3 +80,7 @@ make install
make -C $arch/libstdc++-v3 install-strip
cd ..
+
+# Clean up arch-prefixed g++, etc.
+#
+rm -f /$arch/bin/$arch-*
diff --git a/binary/linux-gnu/gcc-configure b/binary/linux-gnu/gcc-configure
index b2872a6..8d1295c 100755
--- a/binary/linux-gnu/gcc-configure
+++ b/binary/linux-gnu/gcc-configure
@@ -1,28 +1,24 @@
#! /bin/sh
-extra=
-
-if test "$1" = "x86_64-linux-gnu"; then
- extra="--libdir=/$1/lib64"
-fi
-
-../../gcc/configure \
+../gcc/configure \
--disable-bootstrap \
--enable-languages=c,c++ \
--disable-multiarch \
+--disable-multilib \
--enable-shared \
--disable-libssp \
--disable-libgomp \
+--disable-libsanitizer \
+--disable-libcilkrts \
--enable-nls \
---disable-multilib \
--disable-libstdcxx-pch \
+--disable-libstdcxx-debug \
--prefix=/$1 \
--enable-plugin \
--build=$1 \
--host=$1 \
--target=$1 \
--enable-cxx-flags=-fPIC \
-$extra \
CFLAGS=-O2 CXXFLAGS=-O2 LDFLAGS=-s \
CFLAGS_FOR_TARGET="-O2 -fPIC" CXXFLAGS_FOR_TARGET="-O2 -fPIC"
diff --git a/binary/linux-gnu/odb-configure b/binary/linux-gnu/odb-configure
index c592351..84d9aad 100755
--- a/binary/linux-gnu/odb-configure
+++ b/binary/linux-gnu/odb-configure
@@ -8,5 +8,5 @@
--prefix=$3 \
--libexecdir=$3/$4 \
CXX="g++ -nodefaultlibs" \
-CXXFLAGS=-O2 \
+CXXFLAGS="-O2 -fno-devirtualize" \
LIBS="-Wl,-Bstatic,-lstdc++,-Bdynamic -Wl,-lgcc -Wl,-lgcc_eh -Wl,-lm -Wl,-lc"