set target for darwin binary compat in skarnet.org packages

skalibs:
execline:
s6-dns:
s6-networking:
s6-portable-utils:
s6-rc:
s6:

The above software uses the target triplet from `cc -dumpmachine` as a
binary compatibility check. However, on darwin, the output includes the
darwin version number, which leads to build failures against a binary
skalibs package built a different version of darwin than the current
system.

Explicitly setting target ensures code can be compiled against a skalibs
binary built on a different version of darwin.

See http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph
This commit is contained in:
Patrick Mahoney 2016-04-01 10:20:13 -05:00
parent e0c225857f
commit fc1f5d2cf1
7 changed files with 24 additions and 7 deletions

View File

@ -23,7 +23,14 @@ in stdenv.mkDerivation rec {
"--libdir=\${prefix}/lib"
"--includedir=\${prefix}/include"
"--sysdepdir=\${prefix}/lib/skalibs/sysdeps"
] ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]);
]
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
# On darwin, the target triplet from -dumpmachine includes version number, but
# skarnet.org software uses the triplet to test binary compatibility.
# Explicitly setting target ensures code can be compiled against a skalibs
# binary built on a different version of darwin.
# http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph
++ (stdenv.lib.optional stdenv.isDarwin "--target=${stdenv.system}");
meta = {
homepage = http://skarnet.org/software/skalibs/;

View File

@ -25,7 +25,9 @@ in stdenv.mkDerivation rec {
"--with-include=${skalibs}/include"
"--with-lib=${skalibs}/lib"
"--with-dynlib=${skalibs}/lib"
] ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]);
]
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
++ (stdenv.lib.optional stdenv.isDarwin "--target=${stdenv.system}");
meta = {
homepage = http://skarnet.org/software/execline/;

View File

@ -20,7 +20,8 @@ in stdenv.mkDerivation rec {
"--with-include=${skalibs}/include"
"--with-lib=${skalibs}/lib"
"--with-dynlib=${skalibs}/lib"
];
]
++ (stdenv.lib.optional stdenv.isDarwin "--target=${stdenv.system}");
meta = {
homepage = http://www.skarnet.org/software/s6-portable-utils/;

View File

@ -25,7 +25,9 @@ in stdenv.mkDerivation rec {
"--with-include=${skalibs}/include"
"--with-lib=${skalibs}/lib"
"--with-dynlib=${skalibs}/lib"
] ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]);
]
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
++ (stdenv.lib.optional stdenv.isDarwin "--target=${stdenv.system}");
meta = {
homepage = http://www.skarnet.org/software/s6-dns/;

View File

@ -32,7 +32,8 @@ in stdenv.mkDerivation rec {
"--with-dynlib=${execline}/lib"
"--with-dynlib=${s6}/lib"
"--with-dynlib=${s6Dns}/lib"
];
]
++ (stdenv.lib.optional stdenv.isDarwin "--target=${stdenv.system}");
meta = {
homepage = http://www.skarnet.org/software/s6-networking/;

View File

@ -29,7 +29,9 @@ in stdenv.mkDerivation rec {
"--with-dynlib=${skalibs}/lib"
"--with-dynlib=${execline}/lib"
"--with-dynlib=${s6}/lib"
] ++ [ (if stdenv.isDarwin then "--disable-shared" else "--enable-shared") ];
]
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
++ (stdenv.lib.optional stdenv.isDarwin "--target=${stdenv.system}");
meta = {
homepage = http://skarnet.org/software/s6-rc/;

View File

@ -26,7 +26,9 @@ in stdenv.mkDerivation rec {
"--with-lib=${execline}/lib"
"--with-dynlib=${skalibs}/lib"
"--with-dynlib=${execline}/lib"
] ++ [ (if stdenv.isDarwin then "--disable-shared" else "--enable-shared") ];
]
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
++ (stdenv.lib.optional stdenv.isDarwin "--target=${stdenv.system}");
preBuild = ''
substituteInPlace "src/daemontools-extras/s6-log.c" \