summaryrefslogtreecommitdiff
path: root/binary/linux-gnu/gcc-configure
blob: b2872a69dcdd7162e037f03441c514055aa9d5a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#! /bin/sh

extra=

if test "$1" = "x86_64-linux-gnu"; then
  extra="--libdir=/$1/lib64"
fi

../../gcc/configure \
--disable-bootstrap \
--enable-languages=c,c++ \
--disable-multiarch \
--enable-shared \
--disable-libssp \
--disable-libgomp \
--enable-nls \
--disable-multilib \
--disable-libstdcxx-pch \
--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"


# --with-sysroot=/x86_64-linux-gnu

#/x86_64-linux-gnu/bin/g++ -v -nodefaultlibs -shared -o libtest.so -fPIC ~/work/c++/sizeof_funds.cxx -Wl,-Bstatic,-lstdc++,-Bdynamic -lgcc -lgcc_eh -lm -lc