diff options
Diffstat (limited to 'source/d/gcc')
-rw-r--r-- | source/d/gcc/ecj-4.3.jar | bin | 1377431 -> 0 bytes | |||
-rw-r--r-- | source/d/gcc/ecj-4.5.jar | bin | 0 -> 1470676 bytes | |||
-rw-r--r-- | source/d/gcc/fastjar-patches/1000-fastjar-0.97-segfault.patch | 29 | ||||
-rw-r--r-- | source/d/gcc/fastjar-patches/1001-fastjar-0.97-len1.patch | 16 | ||||
-rw-r--r-- | source/d/gcc/fastjar-patches/1002-fastjar-0.97-filename0.patch | 14 | ||||
-rw-r--r-- | source/d/gcc/fastjar-patches/1003-fastjar-CVE-2010-0831.patch | 102 | ||||
-rw-r--r-- | source/d/gcc/fastjar-patches/1004-fastjar-man.patch | 27 | ||||
-rw-r--r-- | source/d/gcc/gcc-no_fixincludes.diff | 12 | ||||
-rwxr-xr-x | source/d/gcc/gcc.SlackBuild | 211 |
9 files changed, 341 insertions, 70 deletions
diff --git a/source/d/gcc/ecj-4.3.jar b/source/d/gcc/ecj-4.3.jar Binary files differdeleted file mode 100644 index db02a5e24..000000000 --- a/source/d/gcc/ecj-4.3.jar +++ /dev/null diff --git a/source/d/gcc/ecj-4.5.jar b/source/d/gcc/ecj-4.5.jar Binary files differnew file mode 100644 index 000000000..8d5ed17a9 --- /dev/null +++ b/source/d/gcc/ecj-4.5.jar diff --git a/source/d/gcc/fastjar-patches/1000-fastjar-0.97-segfault.patch b/source/d/gcc/fastjar-patches/1000-fastjar-0.97-segfault.patch new file mode 100644 index 000000000..ab6262407 --- /dev/null +++ b/source/d/gcc/fastjar-patches/1000-fastjar-0.97-segfault.patch @@ -0,0 +1,29 @@ +2009-01-14 Jakub Jelinek <jakub@redhat.com> + + * jartool.c (make_manifest): Initialize current_time before + calling unix2dostime on it. + +--- fastjar-0.97/jartool.c.jj 2008-10-15 18:35:37.000000000 +0200 ++++ fastjar-0.97/jartool.c 2009-01-14 15:40:50.000000000 +0100 +@@ -820,6 +820,10 @@ int make_manifest(int jfd, const char *m + int mod_time; /* file modification time */ + struct zipentry *ze; + ++ current_time = time(NULL); ++ if(current_time == (time_t)-1) ++ exit_on_error("time"); ++ + mod_time = unix2dostime(¤t_time); + + /* If we are creating a new manifest, create a META-INF directory entry */ +@@ -828,10 +832,6 @@ int make_manifest(int jfd, const char *m + + memset((file_header + 12), '\0', 16); /*clear mod time, crc, size fields*/ + +- current_time = time(NULL); +- if(current_time == (time_t)-1) +- exit_on_error("time"); +- + PACK_UB2(file_header, LOC_EXTRA, 0); + PACK_UB2(file_header, LOC_COMP, 0); + PACK_UB2(file_header, LOC_FNLEN, nlen); diff --git a/source/d/gcc/fastjar-patches/1001-fastjar-0.97-len1.patch b/source/d/gcc/fastjar-patches/1001-fastjar-0.97-len1.patch new file mode 100644 index 000000000..722351d33 --- /dev/null +++ b/source/d/gcc/fastjar-patches/1001-fastjar-0.97-len1.patch @@ -0,0 +1,16 @@ +2009-12-21 Chris Ball <cjb@laptop.org> + + * jartool.c (add_file_to_jar): Test write return value against -1 + instead of 1. + +--- fastjar-0.97/jartool.c.jj 2008-10-15 12:35:37.000000000 -0400 ++++ fastjar-0.97/jartool.c 2009-12-22 06:48:09.309530000 -0500 +@@ -1257,7 +1257,7 @@ int add_file_to_jar(int jfd, int ffd, co + exit_on_error("write"); + + /* write the file name to the zip file */ +- if (1 == write(jfd, fname, file_name_length)) ++ if (-1 == write(jfd, fname, file_name_length)) + exit_on_error("write"); + + if(verbose){ diff --git a/source/d/gcc/fastjar-patches/1002-fastjar-0.97-filename0.patch b/source/d/gcc/fastjar-patches/1002-fastjar-0.97-filename0.patch new file mode 100644 index 000000000..34a02a74f --- /dev/null +++ b/source/d/gcc/fastjar-patches/1002-fastjar-0.97-filename0.patch @@ -0,0 +1,14 @@ +2010-03-01 Richard Guenther <rguenther@suse.de> + + * jartool.c (read_entries): Properly zero-terminate filename. + +--- fastjar-0.97/jartool.c 6 Sep 2009 22:16:00 -0000 1.59 ++++ fastjar-0.97/jartool.c 1 Mar 2010 15:38:43 -0000 1.60 +@@ -790,6 +790,7 @@ int read_entries (int fd) + progname, jarfile); + return 1; + } ++ ze->filename[len] = '\0'; + len = UNPACK_UB4(header, CEN_EFLEN); + len += UNPACK_UB4(header, CEN_COMLEN); + if (lseek (fd, len, SEEK_CUR) == -1) diff --git a/source/d/gcc/fastjar-patches/1003-fastjar-CVE-2010-0831.patch b/source/d/gcc/fastjar-patches/1003-fastjar-CVE-2010-0831.patch new file mode 100644 index 000000000..2c6e23c76 --- /dev/null +++ b/source/d/gcc/fastjar-patches/1003-fastjar-CVE-2010-0831.patch @@ -0,0 +1,102 @@ +2010-06-10 Jakub Jelinek <jakub@redhat.com> + Dan Rosenberg <dan.j.rosenberg@gmail.com> + + * jartool.c (extract_jar): Fix up checks for traversal to parent + directories, disallow absolute paths, make the code slightly more + efficient. + +--- fastjar-0.97/jartool.c.jj 2009-09-07 00:10:47.000000000 +0200 ++++ fastjar-0.97/jartool.c 2010-06-08 20:00:29.000000000 +0200 +@@ -1730,7 +1730,17 @@ int extract_jar(int fd, const char **fil + struct stat sbuf; + int depth = 0; + +- tmp_buff = malloc(sizeof(char) * strlen((const char *)filename)); ++ if(*filename == '/'){ ++ fprintf(stderr, "Absolute path names are not allowed.\n"); ++ exit(EXIT_FAILURE); ++ } ++ ++ tmp_buff = malloc(strlen((const char *)filename)); ++ ++ if(tmp_buff == NULL) { ++ fprintf(stderr, "Out of memory.\n"); ++ exit(EXIT_FAILURE); ++ } + + for(;;){ + const ub1 *idx = (const unsigned char *)strchr((const char *)start, '/'); +@@ -1738,25 +1748,28 @@ int extract_jar(int fd, const char **fil + if(idx == NULL) + break; + else if(idx == start){ ++ tmp_buff[idx - filename] = '/'; + start++; + continue; + } +- start = idx + 1; + +- strncpy(tmp_buff, (const char *)filename, (idx - filename)); +- tmp_buff[(idx - filename)] = '\0'; ++ memcpy(tmp_buff + (start - filename), (const char *)start, (idx - start)); ++ tmp_buff[idx - filename] = '\0'; + + #ifdef DEBUG + printf("checking the existance of %s\n", tmp_buff); + #endif +- if(strcmp(tmp_buff, "..") == 0){ ++ if(idx - start == 2 && memcmp(start, "..", 2) == 0){ + --depth; + if (depth < 0){ + fprintf(stderr, "Traversal to parent directories during unpacking!\n"); + exit(EXIT_FAILURE); + } +- } else if (strcmp(tmp_buff, ".") != 0) ++ } else if (idx - start != 1 || *start != '.') + ++depth; ++ ++ start = idx + 1; ++ + if(stat(tmp_buff, &sbuf) < 0){ + if(errno != ENOENT) + exit_on_error("stat"); +@@ -1765,6 +1778,7 @@ int extract_jar(int fd, const char **fil + #ifdef DEBUG + printf("Directory exists\n"); + #endif ++ tmp_buff[idx - filename] = '/'; + continue; + }else { + fprintf(stderr, "Hmmm.. %s exists but isn't a directory!\n", +@@ -1781,10 +1795,11 @@ int extract_jar(int fd, const char **fil + if(verbose && handle) + printf("%10s: %s/\n", "created", tmp_buff); + ++ tmp_buff[idx - filename] = '/'; + } + + /* only a directory */ +- if(strlen((const char *)start) == 0) ++ if(*start == '\0') + dir = TRUE; + + #ifdef DEBUG +@@ -1792,7 +1807,7 @@ int extract_jar(int fd, const char **fil + #endif + + /* If the entry was just a directory, don't write to file, etc */ +- if(strlen((const char *)start) == 0) ++ if(*start == '\0') + f_fd = -1; + + free(tmp_buff); +@@ -1876,7 +1891,8 @@ int extract_jar(int fd, const char **fil + exit(EXIT_FAILURE); + } + +- close(f_fd); ++ if (f_fd != -1) ++ close(f_fd); + + if(verbose && dir == FALSE && handle) + printf("%10s: %s\n", diff --git a/source/d/gcc/fastjar-patches/1004-fastjar-man.patch b/source/d/gcc/fastjar-patches/1004-fastjar-man.patch new file mode 100644 index 000000000..34bf704db --- /dev/null +++ b/source/d/gcc/fastjar-patches/1004-fastjar-man.patch @@ -0,0 +1,27 @@ +2010-03-24 Jan Kratochvil <jan.kratochvil@redhat.com> + + * Makefile.am (POD2MAN): Provide --date from ChangeLog. + * Makefile.in: Regenerate. + +--- fastjar-0.97/Makefile.am.jj 2008-10-16 04:24:55.000000000 -0400 ++++ fastjar-0.97/Makefile.am 2010-06-21 09:29:41.021398000 -0400 +@@ -39,7 +39,7 @@ EXTRA_DIST = \ + texi2pod.pl + + TEXI2POD = perl $(srcdir)/texi2pod.pl +-POD2MAN = pod2man --center="GNU" --release=@VERSION@ ++POD2MAN = pod2man --center="GNU" --release=@VERSION@ --date=$(shell sed -n '1s/ .*//p' <$(srcdir)/ChangeLog) + + .pod.1: + -($(POD2MAN) --section=1 $< > $(@).T$$$$ && \ +--- fastjar-0.97/Makefile.in.jj 2008-10-16 04:15:16.000000000 -0400 ++++ fastjar-0.97/Makefile.in 2010-06-21 09:30:15.882810000 -0400 +@@ -515,7 +515,7 @@ EXTRA_DIST = \ + texi2pod.pl + + TEXI2POD = perl $(srcdir)/texi2pod.pl +-POD2MAN = pod2man --center="GNU" --release=@VERSION@ ++POD2MAN = pod2man --center="GNU" --release=@VERSION@ --date=$(shell sed -n '1s/ .*//p' <$(srcdir)/ChangeLog) + + #SPLINT_FLAGS=-I . -I $(srcdir)/lib -I $(srcdir) -DHAVE_CONFIG_H +posixlib +weak + SPLINT_FLAGS = -I . -I $(srcdir)/lib -I $(srcdir) -DHAVE_CONFIG_H -DPRIx32= -warnposix +weak diff --git a/source/d/gcc/gcc-no_fixincludes.diff b/source/d/gcc/gcc-no_fixincludes.diff index 917b14f0a..52b661613 100644 --- a/source/d/gcc/gcc-no_fixincludes.diff +++ b/source/d/gcc/gcc-no_fixincludes.diff @@ -1,6 +1,6 @@ ---- ./gcc/Makefile.in.orig 2008-12-04 17:00:19.000000000 -0600 -+++ ./gcc/Makefile.in 2009-01-29 01:17:33.000000000 -0600 -@@ -3441,9 +3441,9 @@ +--- ./gcc/Makefile.in.orig 2010-04-02 02:49:06.000000000 -0500 ++++ ./gcc/Makefile.in 2010-08-01 16:55:30.088318841 -0500 +@@ -3864,9 +3864,9 @@ chmod a+r $${fix_dir}/limits.h; \ done # Install the README @@ -13,13 +13,13 @@ $(STAMP) $@ .PHONY: install-gcc-tooldir -@@ -3523,10 +3523,7 @@ - chmod a+rx $${fix_dir} || true; \ +@@ -3947,10 +3947,7 @@ (TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \ SHELL='$(SHELL)'; MACRO_LIST=`${PWD_COMMAND}`/macro_list ; \ + gcc_dir=`${PWD_COMMAND}` ; \ - export TARGET_MACHINE srcdir SHELL MACRO_LIST && \ - cd $(build_objdir)/fixincludes && \ -- $(SHELL) ./fixinc.sh ../../gcc/$${fix_dir} \ +- $(SHELL) ./fixinc.sh "$${gcc_dir}/$${fix_dir}" \ - $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \ + export TARGET_MACHINE srcdir SHELL MACRO_LIST ); \ rm -f $${fix_dir}/syslimits.h; \ diff --git a/source/d/gcc/gcc.SlackBuild b/source/d/gcc/gcc.SlackBuild index b11a7c6c8..8288a2a44 100755 --- a/source/d/gcc/gcc.SlackBuild +++ b/source/d/gcc/gcc.SlackBuild @@ -2,7 +2,7 @@ # GCC package build script (written by volkerdi@slackware.com) # # Copyright 2003, 2004 Slackware Linux, Inc., Concord, California, USA -# Copyright 2005, 2006, 2007, 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -42,11 +42,12 @@ # I see no reason to continue 386 support in the latest Slackware (and indeed # it's no longer easily possible). -VERSION=4.4.4 -BUILD=${BUILD:-1} +PKGNAM=gcc +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-2} # How many jobs to run in parallel: -NUMJOB=" -j 4 " +NUMJOBS=" -j 7 " # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -119,7 +120,7 @@ tar xvf $CWD/gcc-$VERSION.tar.?z* # Copy ecj.jar into the TLD of the source. Needed for java compiler. # This can be retrieved from ftp://sourceware.org/pub/java -cp $CWD/ecj-4.3.jar gcc-$VERSION/ecj.jar +cp $CWD/ecj-4.5.jar gcc-$VERSION/ecj.jar # install docs ( cd gcc-$VERSION @@ -154,7 +155,7 @@ cp $CWD/ecj-4.3.jar gcc-$VERSION/ecj.jar mkdir -p $PKG1/usr/doc/gcc-${VERSION}/gcc ( cd gcc cp -a \ - ABOUT* COPYING* LANG* ONEWS README* SERVICE \ + ABOUT* COPYING* DATESTAMP DEV-PHASE LANG* ONEWS README* SERVICE \ $PKG1/usr/doc/gcc-$VERSION/gcc mkdir -p $PKG3/usr/doc/gcc-${VERSION}/gcc/fortran @@ -207,11 +208,11 @@ cp $CWD/ecj-4.3.jar gcc-$VERSION/ecj.jar fi ) - mkdir -p $PKG3/usr/doc/gcc-${VERSION}/libada + mkdir -p $PKG4/usr/doc/gcc-${VERSION}/libada ( cd libada if [ -r ChangeLog ]; then - cat ChangeLog | head -n 1000 > $PKG3/usr/doc/gcc-${VERSION}/libada/ChangeLog - touch -r ChangeLog $PKG3/usr/doc/gcc-${VERSION}/libada/ChangeLog + cat ChangeLog | head -n 1000 > $PKG4/usr/doc/gcc-${VERSION}/libada/ChangeLog + touch -r ChangeLog $PKG4/usr/doc/gcc-${VERSION}/libada/ChangeLog fi ) @@ -270,7 +271,7 @@ cp $CWD/ecj-4.3.jar gcc-$VERSION/ecj.jar ( cd libstdc++-v3 cp -a \ README* \ - docs/html/faq \ + doc/html/faq.html \ $PKG2/usr/doc/gcc-${VERSION}/libstdc++-v3 if [ -r ChangeLog ]; then cat ChangeLog | head -n 1000 > $PKG2/usr/doc/gcc-${VERSION}/libstdc++-v3/ChangeLog @@ -278,6 +279,72 @@ cp $CWD/ecj-4.3.jar gcc-$VERSION/ecj.jar fi ) ) + +# Add fastjar to the gcc-java package: +( cd $TMP + FASTJARVER=$(echo $CWD/fastjar-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev) + echo + echo "Building fastjar-$FASTJARVER first" + echo + rm -rf fastjar-$FASTJARVER + tar xvf $CWD/fastjar-$FASTJARVER.tar.xz || exit 1 + cd fastjar-$FASTJARVER || exit + chown -R root:root . + find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + for patch in $CWD/fastjar-patches/*.gz ; do + zcat $patch | patch -p1 --verbose || exit 1 + done + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix=/usr \ + --libdir=/usr/lib$LIBDIRSUFFIX \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --build=$ARCH-slackware-linux + make $NUMJOBS || exit 1 + make install DESTDIR=$PKG5 || exit 1 + mkdir -p $PKG5/usr/doc/fastjar-$FASTJARVER + cp -a \ + AUTHORS CHANGES COPYING* INSTALL NEWS README* TODO \ + $PKG5/usr/doc/fastjar-$FASTJARVER + # If there's a ChangeLog, installing at least part of the recent history + # is useful, but don't let it get totally out of control: + if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG5/usr/doc/fastjar-$FASTJARVER) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog + fi + find $PKG5 | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + # Compress and if needed symlink the man pages: + if [ -d $PKG5/usr/man ]; then + ( cd $PKG5/usr/man + for manpagedir in $(find . -type d -name "man*") ; do + ( cd $manpagedir + for eachpage in $( find . -type l -maxdepth 1) ; do + ln -s $( readlink $eachpage ).gz $eachpage.gz + rm $eachpage + done + gzip -9 *.? + ) + done + ) + fi + # Compress info files, if any: + if [ -d $PKG5/usr/info ]; then + ( cd $PKG5/usr/info + rm -f dir + gzip -9 * + ) + fi + echo +) || exit 1 + # build gcc ( mkdir gcc.build.lnx; cd gcc.build.lnx; @@ -301,9 +368,11 @@ cp $CWD/ecj-4.3.jar gcc-$VERSION/ecj.jar CXXFLAGS="$SLKCFLAGS" \ ../gcc-$VERSION/configure --prefix=/usr \ --libdir=/usr/lib$LIBDIRSUFFIX \ + --mandir=/usr/man \ + --infodir=/usr/info \ --enable-shared \ --enable-bootstrap \ - --enable-languages=ada,c,c++,fortran,java,objc \ + --enable-languages=ada,c,c++,fortran,java,objc,lto \ --enable-threads=posix \ --enable-checking=release \ --with-system-zlib \ @@ -311,6 +380,7 @@ cp $CWD/ecj-4.3.jar gcc-$VERSION/ecj.jar --disable-libunwind-exceptions \ --enable-__cxa_atexit \ --enable-libssp \ + --enable-lto \ --with-gnu-ld \ --verbose \ $GCC_ARCHOPTS \ @@ -321,26 +391,32 @@ cp $CWD/ecj-4.3.jar gcc-$VERSION/ecj.jar # Start the build: # Include all debugging info (for now): - make $NUMJOB bootstrap; + make $NUMJOBS bootstrap; ( cd gcc - make $NUMJOB gnatlib GNATLIBCFLAGS="$SLKCFLAGS" + make $NUMJOBS gnatlib GNATLIBCFLAGS="$SLKCFLAGS" # This wants a shared -ladd2line? #make gnatlib-shared CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ - make $NUMJOB gnattools + make $NUMJOBS gnattools ) make info # Set GCCCHECK=something to run the tests if [ ! -z $GCCCHECK ]; then - make $NUMJOB check + make $NUMJOBS check fi make install DESTDIR=$PKG1 +# KLUDGE ALERT +# These *gdb.py files are causing ldconfig to complain, so they are going +# to be REMOVED for now... at some point, they might be moved somewhere +# else, in which case things should Just Work(tm). Keep an eye on it. +rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/*gdb.py + # Be sure the "specs" file is installed. if [ ! -r $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/${ARCH}-slackware-linux/${VERSION}/specs ]; then cat stage1-gcc/specs > $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/${ARCH}-slackware-linux/${VERSION}/specs @@ -354,58 +430,65 @@ fi # make ada.install-common DESTDIR=$PKG1 # make install-gnatlib DESTDIR=$PKG1 - make -i install-info DESTDIR=$PKG1 +make -i install-info DESTDIR=$PKG1 - chmod 755 $PKG1/usr/lib${LIBDIRSUFFIX}/libgcc_s.so.1 +chmod 755 $PKG1/usr/lib${LIBDIRSUFFIX}/libgcc_s.so.1 - # This is provided by binutils, so delete it here: - rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/libiberty.a - rm -f $PKG1/usr/lib/libiberty.a # catch-all +# The (huge) static GNU java libraries are not packaged. In nearly all +# cases one or more dependencies will not be available as static anyway. +rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/libgcj.a +rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/libgcj-tools.a - # Fix stuff up: - ( cd $PKG1/usr/info ; rm dir ; gzip -9 * ) - ( cd $PKG1 - # *not* ${LIBDIRSUFFIX} - mkdir -p lib - cd lib - ln -sf /usr/bin/cpp . - ) - ( cd $PKG1/usr/bin - mv g++ g++-gcc-$VERSION - mv gcc gcc-$VERSION - mv ${TARGET}-gfortran gfortran-gcc-$VERSION - ln -sf g++-gcc-$VERSION g++ - ln -sf gcc-$VERSION gcc - ln -sf g++ c++ - ln -sf gcc cc - ln -sf gcc-$VERSION ${TARGET}-gcc - ln -sf gcc-$VERSION ${TARGET}-gcc-$VERSION - ln -sf gcj ${TARGET}-gcj - ln -sf gcjh ${TARGET}-gcjh - ln -sf g++-gcc-$VERSION ${TARGET}-c++ - ln -sf g++-gcc-$VERSION ${TARGET}-g++ - ln -sf gfortran-gcc-$VERSION gfortran - ln -sf gfortran-gcc-$VERSION ${TARGET}-gfortran - ln -sf gfortran-gcc-$VERSION ${TARGET}-gfortran-$VERSION - ln -sf gfortran-gcc-$VERSION ${TARGET}-g95 - ln -sf gfortran g95 - ln -sf gfortran f95 - ln -sf gfortran-gcc-$VERSION ${TARGET}-g77 - ln -sf gfortran g77 - ln -sf gfortran f77 - ) - ( cd $PKG1/usr/man - gzip -9 */* - cd man1 - ln -sf g++.1.gz c++.1.gz - ln -sf gcc.1.gz cc.1.gz - ) - - ## build the txz package - #( - # cd $PKG1; - # makepkg -l y -c n $TMP/gcc-$VERSION-$ARCH-$BUILD.txz - #) +# This is provided by binutils, so delete it here: +rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/libiberty.a +rm -f $PKG1/usr/lib/libiberty.a # catch-all + +# Fix stuff up: +( cd $PKG1/usr/info ; rm dir ; gzip -9 * ) +( cd $PKG1 + # *not* ${LIBDIRSUFFIX} + mkdir -p lib + cd lib + ln -sf /usr/bin/cpp . +) + +( cd $PKG1/usr/bin + mv g++ g++-gcc-$VERSION + mv gcc gcc-$VERSION + mv ${TARGET}-gfortran gfortran-gcc-$VERSION + ln -sf g++-gcc-$VERSION g++ + ln -sf gcc-$VERSION gcc + ln -sf g++ c++ + ln -sf gcc cc + ln -sf gcc-$VERSION ${TARGET}-gcc + ln -sf gcc-$VERSION ${TARGET}-gcc-$VERSION + ln -sf gcj ${TARGET}-gcj + ln -sf gcjh ${TARGET}-gcjh + ln -sf g++-gcc-$VERSION ${TARGET}-c++ + ln -sf g++-gcc-$VERSION ${TARGET}-g++ + ln -sf gfortran-gcc-$VERSION gfortran + ln -sf gfortran-gcc-$VERSION ${TARGET}-gfortran + ln -sf gfortran-gcc-$VERSION ${TARGET}-gfortran-$VERSION + ln -sf gfortran-gcc-$VERSION ${TARGET}-g95 + ln -sf gfortran g95 + ln -sf gfortran f95 + ln -sf gfortran-gcc-$VERSION ${TARGET}-g77 + ln -sf gfortran g77 + ln -sf gfortran f77 +) + +( cd $PKG1/usr/man + gzip -9 */* + cd man1 + ln -sf g++.1.gz c++.1.gz + ln -sf gcc.1.gz cc.1.gz +) + +## build the txz package +#( +# cd $PKG1; +# makepkg -l y -c n $TMP/gcc-$VERSION-$ARCH-$BUILD.txz +#) # keep a log ) 2>&1 | tee $TMP/gcc.build.log |