Ticket #34831: strip.patch

File strip.patch, 10.3 KB (added by seanfarley (Sean Farley), 12 years ago)

strip debug symbols from compilers

  • dports/lang/apple-gcc40/Portfile

    # HG changeset patch
    # User Sean Farley <sean@mcs.anl.gov>
    # Date 1339376686 18000
    # Node ID 2eb8b17895e3325288be6de036114857e1583d84
    # Parent  ddef67a58d9340210c7acda34c34a1d45117ec86
    gcc-derived-compilers: strip debug symbols to supress debugger warnings
    
    diff --git a/dports/lang/apple-gcc40/Portfile b/dports/lang/apple-gcc40/Portfile
    a b  
    22
    33PortSystem 1.0
    44
    55name                    apple-gcc40
    66version                 5494
     7revision                1
    78categories              lang
    89platforms               darwin
    910maintainers             nomaintainer
    1011description             Apple's version of gcc 4.0
    1112long_description        Apple's version of the GNU compiler collection, \
     
    5657
    5758post-destroot {
    5859        file delete -force \
    5960                ${destroot}${nprefix}/man ${destroot}${nprefix}/info
    6061        system "cd ${destroot}${prefix}/bin && ln -sf ${nprefix}/bin/gcc-apple-4.0 && ln -sf ${nprefix}/bin/cpp-apple-4.0"
     62        # strip the libraries and ignore errors from dynamic stubs
     63        system -W ${destroot}${prefix} "find . -type f -name '*.dylib' | xargs -I{} strip -x {}; echo"
    6164}
    6265
     66
    6367# It's difficult to distinguish between Apple's gcc-4.0 and gcc-4.2 releases
    6468livecheck.type  none
  • dports/lang/apple-gcc42/Portfile

    diff --git a/dports/lang/apple-gcc42/Portfile b/dports/lang/apple-gcc42/Portfile
    a b  
    44PortGroup select 1.0
    55
    66name                    apple-gcc42
    77version                 5666.3
    88set gcc_version         4.2.1
    9 revision                7
     9revision                8
    1010categories              lang
    1111platforms               darwin
    1212license         GPL-2
    1313maintainers             jeremyhu openmaintainer
    1414installs_libs   no
     
    235235        delete ${destroot}${prefix}/libexec/${name}/gcc/powerpc-apple-darwin${os.major}/4.2.1/as
    236236        ln -s ../../../../../bin/as ${destroot}${prefix}/libexec/${name}/gcc/powerpc-apple-darwin${os.major}/4.2.1/as
    237237        delete ${destroot}${prefix}/libexec/${name}/gcc/powerpc-apple-darwin${os.major}/4.2.1/ld
    238238        ln -s ../../../../../bin/ld ${destroot}${prefix}/libexec/${name}/gcc/powerpc-apple-darwin${os.major}/4.2.1/ld
    239239    }
     240    # strip the libraries and ignore errors from dynamic stubs
     241    system -W ${destroot}${prefix} "find . -type f -name '*.dylib' | xargs -I{} strip -x {}; echo"
    240242}
    241243
    242244livecheck.type          regex
    243245livecheck.url           [lindex ${master_sites} 0]
    244246livecheck.regex         gcc-(\\d+(?:\\.\\d+)*)\\.tar
  • dports/lang/gcc42/Portfile

    diff --git a/dports/lang/gcc42/Portfile b/dports/lang/gcc42/Portfile
    a b  
    33PortSystem 1.0
    44PortGroup select 1.0
    55
    66name                    gcc42
    77version                 4.2.4
    8 revision                3
     8revision                4
    99platforms               darwin
    1010categories              lang
    1111maintainers             mww openmaintainer
    1212# an exception in the license allows dependents to not be GPL
    1313license                 {GPL-3+ GPL-2+ Permissive}
     
    120120post-destroot {
    121121        # install/copy ffitarget.h only if we have it
    122122        if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
    123123                file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
    124124        }
     125        # strip the libraries and ignore errors from dynamic stubs
     126        system -W ${destroot}${prefix} "find . -type f -name '*.dylib' | xargs -I{} strip -x {}; echo"
    125127}
    126128
    127129select.group    gcc
    128130select.file     ${filespath}/mp-${name}
    129131
  • dports/lang/gcc43/Portfile

    diff --git a/dports/lang/gcc43/Portfile b/dports/lang/gcc43/Portfile
    a b  
    33PortSystem 1.0
    44PortGroup select 1.0
    55
    66name                gcc43
    77version             4.3.6
    8 revision            3
     8revision            4
    99platforms           darwin
    1010categories          lang
    1111maintainers         mww openmaintainer
    1212# an exception in the license allows dependents to not be GPL
    1313license             {GPL-3+ GPL-2+ Permissive}
     
    133133        ${destroot}${prefix}/share/info
    134134    # install/copy ffitarget.h only if we have it
    135135    if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
    136136        file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
    137137    }
     138    # strip the libraries and ignore errors from dynamic stubs
     139    system -W ${destroot}${prefix} "find . -type f -name '*.dylib' | xargs -I{} strip -x {}; echo"
    138140}
    139141
    140142select.group        gcc
    141143select.file         ${filespath}/mp-${name}
    142144
  • dports/lang/gcc44/Portfile

    diff --git a/dports/lang/gcc44/Portfile b/dports/lang/gcc44/Portfile
    a b  
    44PortGroup select 1.0
    55
    66name                gcc44
    77epoch               1
    88version             4.4.7
    9 revision            1
     9revision            2
    1010platforms           darwin
    1111categories          lang
    1212maintainers         mww openmaintainer
    1313# an exception in the license allows dependents to not be GPL
    1414license             {GPL-3+ Permissive}
     
    138138    }
    139139    file rename ${destroot}${prefix}/share/python/aotcompile.py \
    140140                ${destroot}${prefix}/share/python/aotcompile-44.py
    141141    file rename ${destroot}${prefix}/share/python/classfile.py \
    142142                ${destroot}${prefix}/share/python/classfile-44.py
     143    # strip the libraries and ignore errors from dynamic stubs
     144    system -W ${destroot}${prefix} "find . -type f -name '*.dylib' | xargs -I{} strip -x {}; echo"
    143145}
    144146
    145147select.group        gcc
    146148select.file         ${filespath}/mp-${name}
    147149
  • dports/lang/gcc45/Portfile

    diff --git a/dports/lang/gcc45/Portfile b/dports/lang/gcc45/Portfile
    a b  
    44PortGroup select 1.0
    55
    66name                gcc45
    77epoch               1
    88version             4.5.3
    9 revision            4
     9revision            5
    1010platforms           darwin
    1111categories          lang
    1212maintainers         mww openmaintainer
    1313# an exception in the license allows dependents to not be GPL
    1414license             {GPL-3+ Permissive}
     
    149149    }
    150150    file rename ${destroot}${prefix}/share/python/aotcompile.py \
    151151                ${destroot}${prefix}/share/python/aotcompile-45.py
    152152    file rename ${destroot}${prefix}/share/python/classfile.py \
    153153                ${destroot}${prefix}/share/python/classfile-45.py
     154    # strip the libraries and ignore errors from dynamic stubs
     155    system -W ${destroot}${prefix} "find . -type f -name '*.dylib' | xargs -I{} strip -x {}; echo"
    154156}
    155157
    156158select.group        gcc
    157159select.file         ${filespath}/mp-${name}
    158160
  • dports/lang/gcc46/Portfile

    diff --git a/dports/lang/gcc46/Portfile b/dports/lang/gcc46/Portfile
    a b  
    44PortGroup select 1.0
    55
    66name                gcc46
    77epoch               1
    88version             4.6.3
    9 revision            2
     9revision            3
    1010platforms           darwin
    1111categories          lang
    1212maintainers         mww openmaintainer
    1313# an exception in the license allows dependents to not be GPL
    1414license             {GPL-3+ Permissive}
     
    120120        ${destroot}${prefix}/share/info
    121121    # install/copy ffitarget.h only if we have it
    122122    if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
    123123        file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
    124124    }
     125    # strip the libraries and ignore errors from dynamic stubs
     126    system -W ${destroot}${prefix} "find . -type f -name '*.dylib' | xargs -I{} strip -x {}; echo"
    125127}
    126128
    127129select.group        gcc
    128130select.file         ${filespath}/mp-${name}
    129131
  • dports/lang/gcc47/Portfile

    diff --git a/dports/lang/gcc47/Portfile b/dports/lang/gcc47/Portfile
    a b  
    44PortGroup select 1.0
    55
    66name                gcc47
    77epoch               1
    88version             4.7.1
     9revision            1
    910platforms           darwin
    1011categories          lang
    1112maintainers         mww openmaintainer
    1213license             GPL-3
    1314description         The GNU compiler collection
     
    118119        ${destroot}${prefix}/share/info
    119120    # install/copy ffitarget.h only if we have it
    120121    if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
    121122        file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
    122123    }
     124    # strip the libraries and ignore errors from dynamic stubs
     125    system -W ${destroot}${prefix} "find . -type f -name '*.dylib' | xargs -I{} strip -x {}; echo"
    123126}
    124127
    125128select.group        gcc
    126129select.file         ${filespath}/mp-${name}
    127130
  • dports/lang/gcc48/Portfile

    diff --git a/dports/lang/gcc48/Portfile b/dports/lang/gcc48/Portfile
    a b  
    33PortSystem 1.0
    44PortGroup select 1.0
    55
    66name                gcc48
    77version             4.8-20120610
     8revision            1
    89platforms           darwin
    910categories          lang
    1011maintainers         mww openmaintainer
    1112license             GPL-3
    1213description         The GNU compiler collection, prerelease BETA
     
    102103        ${destroot}${prefix}/share/info
    103104    # install/copy ffitarget.h only if we have it
    104105    if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
    105106        file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
    106107    }
     108    # strip the libraries and ignore errors from dynamic stubs
     109    system -W ${destroot}${prefix} "find . -type f -name '*.dylib' | xargs -I{} strip -x {}; echo"
    107110}
    108111
    109112select.group        gcc
    110113select.file         ${filespath}/mp-${name}
    111114
  • dports/lang/llvm-gcc42/Portfile

    diff --git a/dports/lang/llvm-gcc42/Portfile b/dports/lang/llvm-gcc42/Portfile
    a b  
    22
    33PortSystem 1.0
    44
    55name                    llvm-gcc42
    66version                 2.9
    7 revision                2
     7revision                3
    88categories              lang
    99platforms               darwin
    1010license                 GPL-2+
    1111maintainers             erickt mfeiri jeremyhu
    1212description             llvm-gcc42 is a gcc compiler frontend for llvm
     
    9494        if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
    9595            file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
    9696        }
    9797        xinstall -m 755 -d ${destroot}${prefix}/etc/select/gcc
    9898        xinstall -m 444 ${filespath}/mp-llvm-gcc42 ${destroot}${prefix}/etc/select/gcc/
     99        # strip the libraries and ignore errors from dynamic stubs
     100        system -W ${destroot}${prefix} "find . -type f -name '*.dylib' | xargs -I{} strip -x {}; echo"
    99101}
    100102
    101103platform darwin {
    102104    depends_run-append  port:ld64
    103105