Disable disable multi -arch flags to perl.c on OSX Compilation of perl.c fails with:
authorDoug MacEachern <dougm@hyperic.com>
Fri, 10 Apr 2009 21:38:33 +0000 (14:38 -0700)
committerFlorian Forster <octo@huhu.verplant.org>
Sat, 11 Apr 2009 07:31:00 +0000 (09:31 +0200)
gcc ... -Wall -Werror -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN ... -MT perl_la-perl.lo -MD -MP -MF ...
...
gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags

See Config_heavy.pl:
$archflags = exists($ENV{ARCHFLAGS}) ? $ENV{ARCHFLAGS} : '-arch i386 -arch ppc';

Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
configure.in

index b2c275a..954d967 100644 (file)
@@ -1683,8 +1683,9 @@ if test "x$with_libperl" = "xyes" \
 then
   SAVE_CFLAGS=$CFLAGS
   SAVE_LDFLAGS=$LDFLAGS
-  PERL_CFLAGS=`$perl_interpreter -MExtUtils::Embed -e ccopts`
-  PERL_LDFLAGS=`$perl_interpreter -MExtUtils::Embed -e ldopts`
+dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string)
+  PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts`
+  PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
   CFLAGS="$CFLAGS $PERL_CFLAGS"
   LDFLAGS="$LDFLAGS $PERL_LDFLAGS"