Skip to content

Commit d69a419

Browse files
committed
Remove any -arch switches given in ExtUtils::Embed's ldopts from our
perl_embed_ldflags setting. On OS X it seems that ExtUtils::Embed is trying to force a universal binary to be built, but you need to specify that a lot further upstream if you want Postgres built that way; the only result of including -arch in perl_embed_ldflags is some warnings at the plperl.so link step. Per my complaint and Jan Otto's suggestion.
1 parent eeb6cb1 commit d69a419

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

config/perl.m4

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/config/perl.m4,v 1.4 2008/11/12 00:00:05 adunstan Exp $
1+
# $PostgreSQL: pgsql/config/perl.m4,v 1.5 2009/09/08 18:15:55 tgl Exp $
22

33

44
# PGAC_PATH_PERL
@@ -25,12 +25,16 @@ AC_DEFUN([PGAC_CHECK_PERL_CONFIGS],
2525

2626
# PGAC_CHECK_PERL_EMBED_LDFLAGS
2727
# -----------------------------
28+
# We are after Embed's ldopts, but without the subset mentioned in
29+
# Config's ccdlflags; and also without any -arch flags, which recent
30+
# Apple releases put in unhelpfully. (If you want a multiarch build
31+
# you'd better be specifying it in more places than plperl's final link.)
2832
AC_DEFUN([PGAC_CHECK_PERL_EMBED_LDFLAGS],
2933
[AC_REQUIRE([PGAC_PATH_PERL])
3034
AC_MSG_CHECKING(for flags to link embedded Perl)
3135
pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
3236
pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
33-
perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
37+
perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e ["s/ -arch [-a-zA-Z0-9_]*//g"]`
3438
AC_SUBST(perl_embed_ldflags)dnl
3539
if test -z "$perl_embed_ldflags" ; then
3640
AC_MSG_RESULT(no)

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6943,7 +6943,7 @@ $as_echo "$perl_useshrplib" >&6; }
69436943
$as_echo_n "checking for flags to link embedded Perl... " >&6; }
69446944
pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
69456945
pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
6946-
perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
6946+
perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
69476947
if test -z "$perl_embed_ldflags" ; then
69486948
{ $as_echo "$as_me:$LINENO: result: no" >&5
69496949
$as_echo "no" >&6; }

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy