Skip to content

Commit

Permalink
Fix CFLAGS for target libraries (weren't propagating correctly throug…
Browse files Browse the repository at this point in the history
…h build) and unified build options between C and C++ compilers. Aside: tried building gcc for C and C++ in the same step, but it fails.
  • Loading branch information
hugovincent committed Nov 5, 2010
1 parent 351649f commit 7bf0827
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Expand Up @@ -96,19 +96,20 @@ cross-binutils: binutils-$(CS_BASE)
$(MAKE) -j$(PROCS) && \
$(MAKE) installdirs install-host install-target

CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -fomit-frame-pointer -fshort-wchar -g -Os"
cross-gcc: cross-binutils gcc-4.4-$(CS_BASE) gcc44patch multilibbash registernamespatch
mkdir -p build/gcc && cd build/gcc && \
pushd ../../gcc-* ; \
make clean ; \
popd ; \
../../gcc-*/configure --prefix=$(PREFIX) --target=$(TARGET) --enable-languages="c" --with-gnu-ld --with-gnu-as --with-newlib --disable-nls --disable-libssp --with-newlib --without-headers --disable-shared --disable-libmudflap --disable-libgomp --disable-libstdcxx-pch --disable-libffi --enable-extra-sgxxlite-multilibs && \
../../gcc-*/configure --prefix=$(PREFIX) --target=$(TARGET) --enable-languages="c" --with-gnu-ld --with-gnu-as --with-newlib --disable-nls --disable-libssp --with-newlib --without-headers --disable-shared --disable-libmudflap --disable-libgomp --disable-libstdcxx-pch --disable-libffi --enable-extra-sgxxlite-multilibs --enable-libstdcxx-allocator=malloc --enable-cxx-flags=$(CFLAGS_FOR_TARGET) CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET) && \
$(MAKE) -j$(PROCS) && \
$(MAKE) installdirs install-target && \
$(MAKE) -C gcc install-common install-cpp install- install-driver install-headers install-man

cross-g++: cross-binutils cross-gcc cross-newlib gcc-4.4-$(CS_BASE) gcc44patch multilibbash registernamespatch
mkdir -p build/g++ && cd build/g++ && \
../../gcc-*/configure --prefix=$(PREFIX) --target=$(TARGET) --enable-languages="c++" --with-gnu-ld --with-gnu-as --with-newlib --disable-nls --disable-libssp --with-newlib --without-headers --disable-shared --disable-libmudflap --disable-libgomp --disable-libstdcxx-pch --disable-libffi --enable-extra-sgxxlite-multilibs --enable-libstdcxx-allocator=malloc --enable-cxx-flags="-ffunction-sections -fdata-sections -fomit-frame-pointer -fshort-wchar -g -Os" && \
../../gcc-*/configure --prefix=$(PREFIX) --target=$(TARGET) --enable-languages="c++" --with-gnu-ld --with-gnu-as --with-newlib --disable-nls --disable-libssp --with-newlib --without-headers --disable-shared --disable-libmudflap --disable-libgomp --disable-libstdcxx-pch --disable-libffi --enable-extra-sgxxlite-multilibs --enable-libstdcxx-allocator=malloc --enable-cxx-flags=$(CFLAGS_FOR_TARGET) CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET) && \
$(MAKE) -j$(PROCS) && \
$(MAKE) installdirs install-target && \
$(MAKE) -C gcc install-common install-cpp install- install-driver install-headers install-man
Expand Down

0 comments on commit 7bf0827

Please sign in to comment.