Menu

#4835 llvm-gcc42-2336.11-8/18/28/38 tweaks for fink Apple sandbox builds

Added_to_Fink
closed-accepted
nobody
5
2016-11-12
2016-11-04
No

The attached file changes tweak the builds of llvm-gcc42-2336.11-8/18/28/38 with the additional ConfiiguraParams parameter of...
--with-local-prefix=/
added to the llvm-gcc42.patch which allows the compiler bootstrap to succeed when performed within an Apple sandbox that denies file reads in /usr/local. The file changes are...

Index: llvm-gcc42-10.10.info
===================================================================
RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/languages/llvm-gcc42-10.10.info,v
retrieving revision 1.3
diff -u -r1.3 llvm-gcc42-10.10.info
--- llvm-gcc42-10.10.info   20 Aug 2016 19:48:37 -0000  1.3
+++ llvm-gcc42-10.10.info   4 Nov 2016 11:49:05 -0000
@@ -1,11 +1,11 @@
 Package: llvm-gcc42
 Version: 2336.11
-Revision: 17
+Revision: 18
 Distribution: 10.10
 Source: http://opensource.apple.com/tarballs/llvmgcc42/llvmgcc42-%v.tar.gz
 Source-MD5: 046629f7b3ce59bcb32b5116d29c27cd
 PatchFile: %n.patch
-PatchFile-MD5: 3ca37e403cacbcf2b3b6fc26efbcc874
+PatchFile-MD5: d54385ce4ed457506154f24d810263a2
 PatchFile2: %n-yosemite.patch
 PatchFile2-MD5: 4505f2331b564f64663bd9870284f488
 PatchFile3: %n-clang.patch
Index: llvm-gcc42-10.11.info
===================================================================
RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/languages/llvm-gcc42-10.11.info,v
retrieving revision 1.4
diff -u -r1.4 llvm-gcc42-10.11.info
--- llvm-gcc42-10.11.info   20 Aug 2016 19:48:37 -0000  1.4
+++ llvm-gcc42-10.11.info   4 Nov 2016 11:49:05 -0000
@@ -1,11 +1,11 @@
 Package: llvm-gcc42
 Version: 2336.11
-Revision: 27
+Revision: 28
 Distribution: 10.11
 Source: http://opensource.apple.com/tarballs/llvmgcc42/llvmgcc42-%v.tar.gz
 Source-MD5: 046629f7b3ce59bcb32b5116d29c27cd
 PatchFile: %n.patch
-PatchFile-MD5: 3ca37e403cacbcf2b3b6fc26efbcc874
+PatchFile-MD5: d54385ce4ed457506154f24d810263a2
 PatchFile2: %n-yosemite.patch
 PatchFile2-MD5: 4505f2331b564f64663bd9870284f488
 PatchFile3: %n-clang.patch
Index: llvm-gcc42-10.12.info
===================================================================
RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/languages/llvm-gcc42-10.12.info,v
retrieving revision 1.1
diff -u -r1.1 llvm-gcc42-10.12.info
--- llvm-gcc42-10.12.info   20 Aug 2016 19:48:37 -0000  1.1
+++ llvm-gcc42-10.12.info   4 Nov 2016 11:49:05 -0000
@@ -1,11 +1,11 @@
 Package: llvm-gcc42
 Version: 2336.11
-Revision: 37
+Revision: 38
 Distribution: 10.12
 Source: http://opensource.apple.com/tarballs/llvmgcc42/llvmgcc42-%v.tar.gz
 Source-MD5: 046629f7b3ce59bcb32b5116d29c27cd
 PatchFile: %n.patch
-PatchFile-MD5: 3ca37e403cacbcf2b3b6fc26efbcc874
+PatchFile-MD5: d54385ce4ed457506154f24d810263a2 
 PatchFile2: %n-yosemite.patch
 PatchFile2-MD5: 4505f2331b564f64663bd9870284f488
 PatchFile3: %n-clang.patch
Index: llvm-gcc42-10.9.info
===================================================================
RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/languages/llvm-gcc42-10.9.info,v
retrieving revision 1.2
diff -u -r1.2 llvm-gcc42-10.9.info
--- llvm-gcc42-10.9.info    28 Sep 2015 22:57:08 -0000  1.2
+++ llvm-gcc42-10.9.info    4 Nov 2016 11:49:05 -0000
@@ -1,11 +1,11 @@
 Package: llvm-gcc42
 Version: 2336.11
-Revision: 7
+Revision: 8
 Distribution: 10.9
 Source: http://opensource.apple.com/tarballs/llvmgcc42/llvmgcc42-%v.tar.gz
 Source-MD5: 046629f7b3ce59bcb32b5116d29c27cd
 PatchFile: %n.patch
-PatchFile-MD5: 3ca37e403cacbcf2b3b6fc26efbcc874
+PatchFile-MD5: d54385ce4ed457506154f24d810263a2
 PatchFile2: %n-clang.patch
 PatchFile2-MD5: b0bbe5d6a8888013ac0b7657690d60a3
 BuildDepends: <<
Index: llvm-gcc42.patch
===================================================================
RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/languages/llvm-gcc42.patch,v
retrieving revision 1.1
diff -u -r1.1 llvm-gcc42.patch
--- llvm-gcc42.patch    10 Sep 2015 20:48:33 -0000  1.1
+++ llvm-gcc42.patch    4 Nov 2016 11:49:05 -0000
@@ -298,7 +298,7 @@

 +  --includedir=$DEST_ROOT/include/llvm-gcc42 \
 +  --program-prefix=llvm- --with-libiconv-prefix=@@FINKPREFIX@@ \
 +  --program-suffix=-$MAJ_VERS \
-+  --with-system-zlib \
++  --with-local-prefix=/ --with-system-zlib \
 +  --disable-nls --without-gmp --without-mpfr \
 +  --with-slibdir=/usr/lib \
 +  --build=$BUILD-apple-darwin$DARWIN_VERS"

Note that --with-local-prefix=/ is used (rather than --with-local-prefix=%p like MacPorts) in order to avoud including %p/include on the header search path which would break package builds that depend on "NoSetCPPFLAGS: true" being honored.

Tested on 10.11 with 'fink -m' using the Apple sandbox patches from https://github.com/fink/fink/pull/135

Discussion

  • Jack Howarth

    Jack Howarth - 2016-11-04

    Info file for llvm-gcc42-2336.11-8 with fix proposed upstream to make remove_duplicates() sandbox friendly

     

    Last edit: Jack Howarth 2016-11-06
  • Jack Howarth

    Jack Howarth - 2016-11-04

    Info file for llvm-gcc42-2336.11-18 with fix proposed upstream to make remove_duplicates() sandbox friendly

     

    Last edit: Jack Howarth 2016-11-06
  • Jack Howarth

    Jack Howarth - 2016-11-04

    Info file for llvm-gcc42-2336.11-28 with fix proposed upstream to make remove_duplicates() sandbox friendly

     

    Last edit: Jack Howarth 2016-11-06
  • Jack Howarth

    Jack Howarth - 2016-11-04

    Info file for llvm-gcc42-2336.11-38 with fix proposed upstream to make remove_duplicates() sandbox friendly

     

    Last edit: Jack Howarth 2016-11-06
  • Jack Howarth

    Jack Howarth - 2016-11-04

    Proposed changes in Info files above are...

    Index: llvm-gcc42-10.9.info
    ===================================================================
    RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/languages/llvm-gcc42-10.9.info,v
    retrieving revision 1.2
    diff -u -r1.2 llvm-gcc42-10.9.info
    --- llvm-gcc42-10.9.info    28 Sep 2015 22:57:08 -0000  1.2
    +++ llvm-gcc42-10.9.info    6 Nov 2016 14:19:34 -0000
    @@ -1,6 +1,6 @@
     Package: llvm-gcc42
     Version: 2336.11
    -Revision: 7
    +Revision: 8
     Distribution: 10.9
     Source: http://opensource.apple.com/tarballs/llvmgcc42/llvmgcc42-%v.tar.gz
     Source-MD5: 046629f7b3ce59bcb32b5116d29c27cd
    @@ -46,6 +46,8 @@
            patch -b -p1 < %{PatchFile2}
        fi
        perl -pi -e 's|-install_name|-Wl,-headerpad_max_install_names -install_name|g' %b/gcc/Makefile.in
    
    +   # make remove_duplicates() sandbox friendly
    +   perl -pi.bak -e "s|if \(errno \!\= ENOENT\)|if \(\(errno \!\= ENOENT\) \&\& \(errno \!\= EPERM\)\)|g" %b/gcc/c-incpath.c
     <<
     CompileScript: <<
     <<
    
    Index: llvm-gcc42-10.10.info
    ===================================================================
    RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/languages/llvm-gcc42-10.10.info,v
    retrieving revision 1.3
    diff -u -r1.3 llvm-gcc42-10.10.info
    --- llvm-gcc42-10.10.info   20 Aug 2016 19:48:37 -0000  1.3
    +++ llvm-gcc42-10.10.info   6 Nov 2016 14:19:34 -0000
    @@ -1,6 +1,6 @@
     Package: llvm-gcc42
     Version: 2336.11
    -Revision: 17
    +Revision: 18
     Distribution: 10.10
     Source: http://opensource.apple.com/tarballs/llvmgcc42/llvmgcc42-%v.tar.gz
     Source-MD5: 046629f7b3ce59bcb32b5116d29c27cd
    @@ -51,6 +51,8 @@
            patch -b -p1 < %{PatchFile3}
        fi
        perl -pi -e 's|-install_name|-Wl,-headerpad_max_install_names -install_name|g' %b/gcc/Makefile.in
    
    +   # make remove_duplicates() sandbox friendly
    +   perl -pi.bak -e "s|if \(errno \!\= ENOENT\)|if \(\(errno \!\= ENOENT\) \&\& \(errno \!\= EPERM\)\)|g" %b/gcc/c-incpath.c
     <<
     CompileScript: <<
     <<
    
    Index: llvm-gcc42-10.11.info
    ===================================================================
    RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/languages/llvm-gcc42-10.11.info,v
    retrieving revision 1.4
    diff -u -r1.4 llvm-gcc42-10.11.info
    --- llvm-gcc42-10.11.info   20 Aug 2016 19:48:37 -0000  1.4
    +++ llvm-gcc42-10.11.info   6 Nov 2016 14:19:34 -0000
    @@ -1,6 +1,6 @@
     Package: llvm-gcc42
     Version: 2336.11
    -Revision: 27
    +Revision: 28
     Distribution: 10.11
     Source: http://opensource.apple.com/tarballs/llvmgcc42/llvmgcc42-%v.tar.gz
     Source-MD5: 046629f7b3ce59bcb32b5116d29c27cd
    @@ -56,6 +56,8 @@
        if [ "$clangcheck" = "y" ]; then
            perl -pi -e 's|--disable-checking --enable-werror|--disable-checking|g' %b/build_gcc
        fi
    
    +   # make remove_duplicates() sandbox friendly
    +   perl -pi.bak -e "s|if \(errno \!\= ENOENT\)|if \(\(errno \!\= ENOENT\) \&\& \(errno \!\= EPERM\)\)|g" %b/gcc/c-incpath.c
    
     <<
     CompileScript: <<
    
    Index: llvm-gcc42-10.12.info
    ===================================================================
    RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/languages/llvm-gcc42-10.12.info,v
    retrieving revision 1.1
    diff -u -r1.1 llvm-gcc42-10.12.info
    --- llvm-gcc42-10.12.info   20 Aug 2016 19:48:37 -0000  1.1
    +++ llvm-gcc42-10.12.info   6 Nov 2016 14:19:34 -0000
    @@ -1,6 +1,6 @@
     Package: llvm-gcc42
     Version: 2336.11
    -Revision: 37
    +Revision: 38
     Distribution: 10.12
     Source: http://opensource.apple.com/tarballs/llvmgcc42/llvmgcc42-%v.tar.gz
     Source-MD5: 046629f7b3ce59bcb32b5116d29c27cd
    @@ -56,7 +56,8 @@
        if [ "$clangcheck" = "y" ]; then
            perl -pi -e 's|--disable-checking --enable-werror|--disable-checking|g' %b/build_gcc
        fi
    
    -   
    +   # make remove_duplicates() sandbox friendly
    +   perl -pi.bak -e "s|if \(errno \!\= ENOENT\)|if \(\(errno \!\= ENOENT\) \&\& \(errno \!\= EPERM\)\)|g" %b/gcc/c-incpath.c
     <<
     CompileScript: <<
     <<
    
     

    Last edit: Jack Howarth 2016-11-06
  • Jack Howarth

    Jack Howarth - 2016-11-06

    Since the llvm-gcc42-2336.11 build doesn't do multiple stage bootstraps, confirmed the sandbox fix for the compiler with the exiisting rasmol packaging and the change...

    perl -pi.bak -e 's|/usr/bin/cc|llvm-gcc-4.2|g' Makefile

    which demonstrates that, under the proposed sandbox patches for fink at https://github.com/fink/fink/pull/135/files, that the compiler now works under the sandbox which blacklists /usr/local.

     
  • Hanspeter Niederstrasser

    • labels: --> languages, Updated Revision of Existing
    • status: open --> closed-accepted
    • Group: Undergoing_Validation --> Added_to_Fink
     

Log in to post a comment.

MongoDB Logo MongoDB