On 2015-12-13 23:16, katja wrote: > iven to both compiler and linker: > > -arch i386 -arch x86_64 -mmacosx-version-min=10.5 > > One thing I noticed when building fat binaries: gcc doesn't define > __i386__ or __x86_64__ which we use to conditionally compile bithacks.
?are you sure?
$ cc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
$ cat > testarch.c <<EOL
#include <stdio.h>
int main() {
#ifdef __i386__
printf("i386\n");
#endif
#ifdef __x86_64__
printf("x86_64\n");
#endif
return 0;
}
EOL
$ make testarch CFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.5"
$ ./testarch
x86_64
$ arch -i386 ./testarch
i386
$ arch -x86_64 ./testarch
x86_64
$
> For this reason I'm now thinking that single-architecture should be
> the default in a generic build system, and fat binary an option.
dunno.
i think that the default should be to just use the system-defaults
(don't tell the compiler which architecture it should build for).
this is driven by the experience with tehe template/Makefile: there are
a number of externals out there that don't build on recent OSX, because
the original template-Makefile would build for PowerPC and apple dropped
out-of-the-box support for ppc.
otoh. it's obviously of utmost importance that any thus-compiled
external loads correctly under a "default" Pd installation.
so for practical reasons it's probably best to use i386/x86_64 (and
don't enable PPC by default)
fgmadr
IOhannes
signature.asc
Description: OpenPGP digital signature
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
