4 次代碼提交 71a23268e4 ... b4a6ea02be

作者 SHA1 備註 提交日期
  Jeremy Rand b4a6ea02be Bug 32355: gcc: Update outdated comment about glibc version 1 年之前
  Jeremy Rand fa87432e62 Bug 32355: gcc: Use new RBM num_procs for linux-cross 1 年之前
  Jeremy Rand bcfb80b088 Bug 32355: gcc: Fix distdir typo 1 年之前
  Jeremy Rand 26c1aef999 Bug 32355: binutils: Remove disabled linux-cross build code 1 年之前
共有 3 個文件被更改,包括 13 次插入30 次删除
  1. 4 22
      projects/binutils/build
  2. 5 5
      projects/gcc/build
  3. 4 3
      projects/gcc/config

+ 4 - 22
projects/binutils/build

@@ -23,6 +23,10 @@ cd [% project %]-[% c("version") %]
 make -j[% c("num_procs") %] MAKEINFO=true
 make install MAKEINFO=true
 
+# gold is disabled for linux-cross, because of
+# https://sourceware.org/bugzilla/show_bug.cgi?id=14995
+# Once we upgrade to glibc 2.26, we might be able to enable gold for
+# linux-cross.
 [% IF c("var/linux") && ! c("var/linux-cross") %]
   # Make sure gold is used with the hardening wrapper for full RELRO, see #13031.
   cd $distdir/bin
@@ -32,28 +36,6 @@ make install MAKEINFO=true
   ln -sf hardened-ld ld.gold
   ln -sf ld.gold ld
 [% END %]
-[% IF c("var/linux-cross") && 0 %]
-  # gold is disabled for cross-compiles, because of
-  # https://sourceware.org/bugzilla/show_bug.cgi?id=14995
-  # Once we upgrade to glibc 2.26 and binutils 2.28, we should be able to
-  # re-introduce gold for cross-compiles.
-
-  # Make sure gold is used with the hardening wrapper for full RELRO, see #13031.
-  # First do the filename-prefixed ones...
-  cd $distdir/bin
-  rm [% c('var/crosstarget') %]-ld
-  cp /usr/bin/hardened-ld ./
-  mv [% c('var/crosstarget') %]-ld.gold [% c('var/crosstarget') %]-ld.gold.real
-  ln -sf hardened-ld [% c('var/crosstarget') %]-ld.gold
-  ln -sf [% c('var/crosstarget') %]-ld.gold [% c('var/crosstarget') %]-ld
-  # Then do the directory-prefixed ones...
-  cd $distdir/[% c('var/crosstarget') %]/bin
-  rm ld
-  cp /usr/bin/hardened-ld ./
-  mv ld.gold ld.gold.real
-  ln -sf hardened-ld ld.gold
-  ln -sf ld.gold ld
-[% END %]
 
 cd /var/tmp/dist
 [% c('tar', {

+ 5 - 5
projects/gcc/build

@@ -51,7 +51,7 @@ mkdir /var/tmp/build
   # Build only the components of GCC that don't need glibc, see Step 3 of
   # https://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/
   cd /var/tmp/build/gcc
-  make -j[% c("buildconf/num_procs") %] all-gcc
+  make -j[% c("num_procs") %] all-gcc
   make install-gcc
   # Removing sys-include is intended to solve a limits.h issue
   rm --recursive --force $distdir/[% c("var/crosstarget") %]/sys-include
@@ -66,7 +66,7 @@ mkdir /var/tmp/build
   # designed to work with the GCC version we're using.
   glibc-[% c("var/glibc_version") %]/configure --prefix=$distdir/[% c("var/crosstarget") %] --build=$MACHTYPE --host=[% c("var/crosstarget") %] --target=[% c("var/crosstarget") %] --with-headers=$distdir/[% c("var/crosstarget") %]/include --disable-multilib --disable-werror libc_cv_forced_unwind=yes
   make install-bootstrap-headers=yes install-headers
-  make -j[% c("buildconf/num_procs") %] csu/subdir_lib
+  make -j[% c("num_procs") %] csu/subdir_lib
   install csu/crt1.o csu/crti.o csu/crtn.o $distdir/[% c("var/crosstarget") %]/lib
   [% c("var/crosstarget") %]-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o $distdir/[% c("var/crosstarget") %]/lib/libc.so
   # stdio_lim.h is intended to solve a limits.h issue
@@ -75,13 +75,13 @@ mkdir /var/tmp/build
   # Build compiler support library, see Step 5 of
   # https://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/
   cd /var/tmp/build/gcc
-  make -j[% c("buildconf/num_procs") %] all-target-libgcc
+  make -j[% c("num_procs") %] all-target-libgcc
   make install-target-libgcc
 
   # finish building glibc, see Step 6 of
   # https://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/
   cd /var/tmp/build/glibc
-  make -j[% c("buildconf/num_procs") %]
+  make -j[% c("num_procs") %]
   make install
 
   # We're done with glibc, we can now finish building gcc...
@@ -102,6 +102,6 @@ make install
 ln -s gcc $distdir/bin/cc
 cd /var/tmp/dist
 [% c('tar', {
-        tar_src => [ c('distdir') ],
+        tar_src => [ c('var/distdir') ],
         tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
         }) %]

+ 4 - 3
projects/gcc/config

@@ -57,9 +57,10 @@ targets:
     var:
       target_prefix: '[% c("var/crosstarget") %]-'
       distdir: gcc-cross
-      # TODO: Upgrade to a glibc that works out of the box with GCC 8.3.0 (blocked
-      # by upgrading Debian to something newer than Wheezy due to the GNU Make
-      # dependency).
+      # TODO: Consider upgrading to a glibc that works out of the box with the
+      # GCC version we use. However, removing our glibc version workarounds may
+      # not be desirable since we want to be able to easily bump the GCC
+      # version without worrying about linux-cross breakage.
       glibc_version: 2.26
       linux_version: 4.10.1
       arch_deps: