summaryrefslogtreecommitdiff
path: root/binary/darwin/gcc-4.5.1-plugin-support.patch
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-02-15 08:44:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-02-15 08:44:41 +0200
commitd845f920ec1f5cd6ef5a95366383e74725912441 (patch)
tree2969ea00c3dbb1553cde248fc918cfb241f361f6 /binary/darwin/gcc-4.5.1-plugin-support.patch
parenta4a5194f4ffc82aa817f4b8e2d4f6d29dac1a0b9 (diff)
Add Mac OS X ODB binary build scripts
Diffstat (limited to 'binary/darwin/gcc-4.5.1-plugin-support.patch')
-rw-r--r--binary/darwin/gcc-4.5.1-plugin-support.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/binary/darwin/gcc-4.5.1-plugin-support.patch b/binary/darwin/gcc-4.5.1-plugin-support.patch
new file mode 100644
index 0000000..9bd7c9f
--- /dev/null
+++ b/binary/darwin/gcc-4.5.1-plugin-support.patch
@@ -0,0 +1,46 @@
+Index: gcc/configure.ac
+===================================================================
+--- gcc/configure.ac (revision 161355)
++++ gcc/configure.ac (working copy)
+@@ -4544,15 +4544,23 @@
+ pluginlibs=
+ if test x"$enable_plugin" = x"yes"; then
+
++ case "${host}" in
++ *-*-darwin*)
++ export_sym_check="$gcc_cv_nm -g"
++ ;;
++ *)
++ export_sym_check="$gcc_cv_objdump -T"
++ ;;
++ esac
+ AC_MSG_CHECKING([for exported symbols])
+ echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
+ ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1
+- if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then
++ if $export_sym_check conftest | grep foobar > /dev/null; then
+ : # No need to use a flag
+ else
+ AC_MSG_CHECKING([for -rdynamic])
+ ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1
+- if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then
++ if $export_sym_check conftest | grep foobar > /dev/null; then
+ plugin_rdynamic=yes
+ pluginlibs="-rdynamic"
+ else
+@@ -4572,7 +4580,14 @@
+
+ # Check that we can build shared objects with -fPIC -shared
+ saved_LDFLAGS="$LDFLAGS"
+- LDFLAGS="$LDFLAGS -fPIC -shared"
++ case "${host}" in
++ *-*-darwin*)
++ LDFLAGS="$LDFLAGS -fPIC -shared -undefined dynamic_lookup"
++ ;;
++ *)
++ LDFLAGS="$LDFLAGS -fPIC -shared"
++ ;;
++ esac
+ AC_MSG_CHECKING([for -fPIC -shared])
+ AC_TRY_LINK(
+ [extern int X;],[return X == 0;],