Ticket #13913: gcc-4.7.2.p0.diff

File gcc-4.7.2.p0.diff, 2.5 KB (added by jdemeyer, 9 years ago)

Spkg diff, for review only.

  • SPKG.txt

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1357557237 -3600
    # Node ID ba5e18a04e4e514aa73d76a9a66ad2f163388565
    # Parent  35dd738f7d7a4456374375d054cdc61fd79af494
    Remove lots of unneeded things from the sources
    
    diff --git a/SPKG.txt b/SPKG.txt
    a b  
    2525
    2626== Special Update/Build Instructions ==
    2727
    28 * Removed the huge src/MD5SUMS file to save space.
    29 
    30 * Removed the src/zlib directory, since Sage already ships with zlib.
    31   We build GCC with --with-system-zlib, so we don't need src/zlib.
     28* Lots of stuff can be removed, run ./spkg-src to do this automatically
     29  (after downloading the sources).
    3230
    3331== Changelog ==
    3432
     33=== gcc-4.7.2.p0 (Jeroen Demeyer, 8 January 2013) ===
     34 * Trac #13913: add spkg-src script to remove lots of unneeded things
     35   from the sources and run it.
     36 * Rename $CONFIGURE_FLAGS to $GCC_CONFIGURE to be consistent with
     37   other packages.
     38 * Disable Native Language Support and remove the corresponding source
     39   files.
     40
    3541=== gcc-4.7.2 (Jeroen Demeyer, 30 September 2012) ===
    3642 * #13150: Upgrade to version 4.7.2 of GCC (as optional package).
    3743
  • spkg-install

    diff --git a/spkg-install b/spkg-install
    a b  
    5555    # Enable internal checks in GCC.  These checks do not affect the
    5656    # binaries produced by GCC, but they do increase the compile time
    5757    # of everything compiled with GCC.
    58     CONFIGURE_FLAGS="$CONFIGURE_FLAGS --enable-checking=yes"
     58    GCC_CONFIGURE="$GCC_CONFIGURE --enable-checking=yes"
    5959fi
    6060
    6161# Use conservative CFLAGS for stage 1 and for the "build" executables
     
    8585    --with-gmp="$SAGE_LOCAL" --with-mpfr="$SAGE_LOCAL" --with-mpc="$SAGE_LOCAL" \
    8686    --with-system-zlib \
    8787    --disable-multilib \
    88     $CONFIGURE_FLAGS "$CONFIGURE_AS" "$CONFIGURE_LD"
     88    --disable-nls \
     89    $GCC_CONFIGURE "$CONFIGURE_AS" "$CONFIGURE_LD"
    8990
    9091$MAKE
    9192
  • new file spkg-src

    diff --git a/spkg-src b/spkg-src
    new file mode 100755
    - +  
     1#!/bin/sh
     2# Remove some unneeded pieces from GCC, after downloading and
     3# extracting the sources and renaming the directory to src/.
     4
     5cd src || exit $?
     6
     7rm MD5SUMS
     8rm -r maintainer-scripts
     9
     10# Remove zlib, since Sage already ships with zlib
     11# and we build GCC with --with-system-zlib.
     12rm -r zlib
     13
     14# Remove Native Language Support
     15rm -r gcc/po libcpp/po
     16
     17# Remove all files for languages other than C, C++, Fortran.
     18rm -r libada gnattools libgo libffi libjava boehm-gc libobjc
     19cd gcc
     20rm -r ada go java objc objcp testsuite