Move vfprintf.c out from sysdeps (XCC)
[akaros.git] / tools / compilers / gcc-glibc / Makefile
index a24fba9..5d8ef20 100644 (file)
@@ -1,5 +1,5 @@
 # Number of make jobs to spawn.  Define it in Makelocal
-MAKE_JOBS :=
+MAKE_JOBS ?= $(shell expr `cat /proc/cpuinfo | grep processor | wc -l` - 1)
 
 BINUTILS_VERSION := 2.24
 GCC_VERSION := 4.9.2
@@ -358,6 +358,7 @@ gcc-$(GCC_VERSION): gcc-$(GCC_VERSION).tar.bz2 \
        rm -rf gcc-$(GCC_VERSION)
        tar -jxf gcc-$(GCC_VERSION).tar.bz2
        $(MAKE) .gcc-akaros-patch
+       patch --no-backup-if-mismatch -p0 < gcc-$(GCC_VERSION)-r233572.patch
        patch --no-backup-if-mismatch -p0 < gcc-$(GCC_VERSION)-riscv.patch
        (cd gcc-$(GCC_VERSION) && \
         ln -s ../gmp-$(GMP_VERSION) gmp && \
@@ -396,6 +397,7 @@ $(BINARY_PREFIX)gcc-stage1-builddir: gcc-$(GCC_VERSION)
                --disable-nls \
                --disable-multilib \
                --enable-languages=c \
+               --enable-linker-build-id \
                $(GCC_BUILD_FLAGS);
        echo "MAKEINFO = :" >> $(BINARY_PREFIX)gcc-stage1-builddir/Makefile;
        touch $@
@@ -443,6 +445,7 @@ $(BINARY_PREFIX)gcc-stage2-builddir: gcc-$(GCC_VERSION)
                --disable-nls \
                --enable-languages=c,c++,fortran \
                --disable-multilib \
+               --enable-linker-build-id \
                $(GCC_BUILD_FLAGS);
        echo "MAKEINFO = :" >> $(BINARY_PREFIX)gcc-stage2-builddir/Makefile;
        touch $@
@@ -472,9 +475,8 @@ $(BINARY_PREFIX)gcc-stage2-builddir: gcc-$(GCC_VERSION)
        mkdir -p $(SYSROOT)/usr/include/ros/arch
        cp -r $(AKAROSDIR)/kern/arch/$(AKAROS_ARCH_DIR)/ros/* \
            $(SYSROOT)/usr/include/ros/arch/
-       mkdir -p $(SYSROOT)/usr/include/parlib
        cp -r $(AKAROSDIR)/user/parlib/include/* \
-           $(SYSROOT)/usr/include/parlib/
+           $(SYSROOT)/usr/include/
        cp -r $(AKAROSDIR)/user/pthread/*.h \
            $(SYSROOT)/usr/include/
 
@@ -644,7 +646,7 @@ native-gcc-stage3-configure: native-gcc-stage3-prep
                --with-isl=no \
                --with-cloog=no \
                --with-libelf=no \
-               --enable-threads=no \
+               --enable-threads=posix \
                --enable-tls \
                --disable-nls \
                --disable-multilib \
@@ -653,6 +655,7 @@ native-gcc-stage3-configure: native-gcc-stage3-prep
                --enable-shared \
                --disable-canonical-prefixes \
                --disable-canonical-system-headers \
+               --enable-linker-build-id \
                $(GCC_BUILD_FLAGS);
 
 cross-gcc-stage3-configure:
@@ -676,7 +679,7 @@ cross-gcc-stage3-configure:
                --with-isl=no \
                --with-cloog=no \
                --with-libelf=no \
-               --enable-threads=no \
+               --enable-threads=posix \
                --disable-nls \
                --disable-multilib \
                --with-local-prefix=$(SYSROOT) \
@@ -685,6 +688,7 @@ cross-gcc-stage3-configure:
                --enable-shared \
                --disable-canonical-prefixes \
                --disable-canonical-system-headers \
+               --enable-linker-build-id \
                $(GCC_BUILD_FLAGS);
 
 .$(BINARY_PREFIX)gcc-stage3-configure: