Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
1ac1bea0
Commit
1ac1bea0
authored
16 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Adjust -Wl,--asneeded test to avoid using the switch if it breaks
libreadline. What we will do for compatibility :-(
parent
9f194709
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/c-compiler.m4
+4
-2
4 additions, 2 deletions
config/c-compiler.m4
configure
+142
-118
142 additions, 118 deletions
configure
configure.in
+26
-16
26 additions, 16 deletions
configure.in
with
172 additions
and
136 deletions
config/c-compiler.m4
+
4
−
2
View file @
1ac1bea0
# Macros to detect C compiler features
# $PostgreSQL: pgsql/config/c-compiler.m4,v 1.1
7
2008/05/
18 20:13:12
tgl Exp $
# $PostgreSQL: pgsql/config/c-compiler.m4,v 1.1
8
2008/05/
20 03:30:21
tgl Exp $
# PGAC_C_SIGNED
...
...
@@ -117,11 +117,13 @@ _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
# ------------------------
# Given a string, check if the compiler supports the string as a
# command-line option. If it does, add the string to LDFLAGS.
# For reasons you'd really rather not know about, this checks whether
# you can link to a particular function, not just whether you can link.
AC_DEFUN([PGAC_PROG_CC_LDFLAGS_OPT],
[AC_MSG_CHECKING([if $CC supports $1])
pgac_save_LDFLAGS=$LDFLAGS
LDFLAGS="$pgac_save_LDFLAGS $1"
AC_LINK_IFELSE([AC_LANG_
PROGRAM(
)],
AC_LINK_IFELSE([AC_LANG_
CALL([],[$2]
)],
AC_MSG_RESULT(yes),
[LDFLAGS="$pgac_save_LDFLAGS"
AC_MSG_RESULT(no)])
...
...
This diff is collapsed.
Click to expand it.
configure
+
142
−
118
View file @
1ac1bea0
...
...
@@ -3977,9 +3977,6 @@ echo "$as_me: error: --enable-profiling is supported only when using GCC" >&2;}
fi
fi
{ echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
# We already have this in Makefile.win32, but configure needs it too
if test "$PORTNAME" = "win32"; then
CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
...
...
@@ -4318,116 +4315,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# If compiler will take -Wl,--as-needed then add that to LDFLAGS.
# This is much easier than trying to filter LIBS to the minimum for each
# executable. (Note that shared libraries won't use this switch, though.)
# On Darwin it's spelled -Wl,-dead_strip_dylibs, but don't try that elsewhere
if test "$PORTNAME" != "darwin"; then
{ echo "$as_me:$LINENO: checking if $CC supports -Wl,--as-needed" >&5
echo $ECHO_N "checking if $CC supports -Wl,--as-needed... $ECHO_C" >&6; }
pgac_save_LDFLAGS=$LDFLAGS
LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
LDFLAGS="$pgac_save_LDFLAGS"
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
else
{ echo "$as_me:$LINENO: checking if $CC supports -Wl,-dead_strip_dylibs" >&5
echo $ECHO_N "checking if $CC supports -Wl,-dead_strip_dylibs... $ECHO_C" >&6; }
pgac_save_LDFLAGS=$LDFLAGS
LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
LDFLAGS="$pgac_save_LDFLAGS"
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
# Create compiler version string
if test x"$GCC" = x"yes" ; then
cc_string="GCC `${CC} --version | sed q`"
...
...
@@ -5596,11 +5483,6 @@ rm -f conftest*
CPPFLAGS="$CPPFLAGS $INCLUDES"
LDFLAGS="$LDFLAGS $LIBDIRS"
{ echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
{ echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
...
...
@@ -25749,6 +25631,148 @@ echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
fi
fi
# If compiler will take -Wl,--as-needed then add that to LDFLAGS.
# This is much easier than trying to filter LIBS to the minimum for each
# executable. (Note that shared libraries won't use this switch, though.)
# On (at least) some Red-Hat-derived systems, this switch breaks linking to
# libreadline; therefore we postpone testing it until we know what library
# dependencies readline has. The test code will try to link with $LIBS.
if test "$with_readline" = yes; then
link_test_func=readline
else
link_test_func=exit
fi
if test "$PORTNAME" != "darwin"; then
{ echo "$as_me:$LINENO: checking if $CC supports -Wl,--as-needed" >&5
echo $ECHO_N "checking if $CC supports -Wl,--as-needed... $ECHO_C" >&6; }
pgac_save_LDFLAGS=$LDFLAGS
LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char $link_test_func ();
int
main ()
{
return $link_test_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
LDFLAGS="$pgac_save_LDFLAGS"
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
else
# On Darwin it's spelled -Wl,-dead_strip_dylibs, but don't try that elsewhere
{ echo "$as_me:$LINENO: checking if $CC supports -Wl,-dead_strip_dylibs" >&5
echo $ECHO_N "checking if $CC supports -Wl,-dead_strip_dylibs... $ECHO_C" >&6; }
pgac_save_LDFLAGS=$LDFLAGS
LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char $link_test_func ();
int
main ()
{
return $link_test_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
LDFLAGS="$pgac_save_LDFLAGS"
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
# Begin output steps
{ echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
{ echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
{ echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
# prepare build tree if outside source tree
# Note 1: test -ef might not exist, but it's more reliable than `pwd`.
# Note 2: /bin/pwd might be better than shell's built-in at getting
...
...
This diff is collapsed.
Click to expand it.
configure.in
+
26
−
16
View file @
1ac1bea0
dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.56
1
2008/05/
18 20:13:1
2 tgl Exp $
dnl $PostgreSQL: pgsql/configure.in,v 1.56
2
2008/05/
20 03:30:2
2 tgl Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
...
...
@@ -426,8 +426,6 @@ if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
fi
fi
AC_MSG_NOTICE([using CFLAGS=$CFLAGS])
# We already have this in Makefile.win32, but configure needs it too
if test "$PORTNAME" = "win32"; then
CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
...
...
@@ -450,16 +448,6 @@ fi
AC_PROG_CPP
AC_SUBST(GCC)
# If compiler will take -Wl,--as-needed then add that to LDFLAGS.
# This is much easier than trying to filter LIBS to the minimum for each
# executable. (Note that shared libraries won't use this switch, though.)
# On Darwin it's spelled -Wl,-dead_strip_dylibs, but don't try that elsewhere
if test "$PORTNAME" != "darwin"; then
PGAC_PROG_CC_LDFLAGS_OPT([-Wl,--as-needed])
else
PGAC_PROG_CC_LDFLAGS_OPT([-Wl,-dead_strip_dylibs])
fi
# Create compiler version string
if test x"$GCC" = x"yes" ; then
cc_string="GCC `${CC} --version | sed q`"
...
...
@@ -773,9 +761,6 @@ AC_SUBST(ELF_SYS)
CPPFLAGS="$CPPFLAGS $INCLUDES"
LDFLAGS="$LDFLAGS $LIBDIRS"
AC_MSG_NOTICE([using CPPFLAGS=$CPPFLAGS])
AC_MSG_NOTICE([using LDFLAGS=$LDFLAGS])
AC_ARG_VAR(LDFLAGS_SL)
PGAC_PROG_LD
...
...
@@ -1712,6 +1697,31 @@ AC_MSG_WARN([*** skipping thread test on Win32])
fi
fi
# If compiler will take -Wl,--as-needed then add that to LDFLAGS.
# This is much easier than trying to filter LIBS to the minimum for each
# executable. (Note that shared libraries won't use this switch, though.)
# On (at least) some Red-Hat-derived systems, this switch breaks linking to
# libreadline; therefore we postpone testing it until we know what library
# dependencies readline has. The test code will try to link with $LIBS.
if test "$with_readline" = yes; then
link_test_func=readline
else
link_test_func=exit
fi
if test "$PORTNAME" != "darwin"; then
PGAC_PROG_CC_LDFLAGS_OPT([-Wl,--as-needed], $link_test_func)
else
# On Darwin it's spelled -Wl,-dead_strip_dylibs, but don't try that elsewhere
PGAC_PROG_CC_LDFLAGS_OPT([-Wl,-dead_strip_dylibs], $link_test_func)
fi
# Begin output steps
AC_MSG_NOTICE([using CFLAGS=$CFLAGS])
AC_MSG_NOTICE([using CPPFLAGS=$CPPFLAGS])
AC_MSG_NOTICE([using LDFLAGS=$LDFLAGS])
# prepare build tree if outside source tree
# Note 1: test -ef might not exist, but it's more reliable than `pwd`.
# Note 2: /bin/pwd might be better than shell's built-in at getting
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment