Move vfprintf.c out from sysdeps (XCC)
[akaros.git] / tools / compilers / gcc-glibc / Makefile
index 48f48d6..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
@@ -228,8 +228,8 @@ make-real:
 
 else # BUILD_ERROR
 
-# Make sure that LD_LIBARY_PATH is not set during the build process
-unexport LD_LIBARY_PATH
+# Make sure that LD_LIBRARY_PATH is not set during the build process
+unexport LD_LIBRARY_PATH
 
 check-env-real:
        @echo "    Your environment checks out. Build away!"
@@ -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,13 +646,16 @@ 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 \
                --enable-c99 \
                --enable-long-long \
                --enable-shared \
+               --disable-canonical-prefixes \
+               --disable-canonical-system-headers \
+               --enable-linker-build-id \
                $(GCC_BUILD_FLAGS);
 
 cross-gcc-stage3-configure:
@@ -674,13 +679,16 @@ 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) \
                --enable-c99 \
                --enable-long-long \
                --enable-shared \
+               --disable-canonical-prefixes \
+               --disable-canonical-system-headers \
+               --enable-linker-build-id \
                $(GCC_BUILD_FLAGS);
 
 .$(BINARY_PREFIX)gcc-stage3-configure: