diff options
Diffstat (limited to 'community/mercury/0002-always-build-shared-libs.patch')
-rw-r--r-- | community/mercury/0002-always-build-shared-libs.patch | 79 |
1 files changed, 37 insertions, 42 deletions
diff --git a/community/mercury/0002-always-build-shared-libs.patch b/community/mercury/0002-always-build-shared-libs.patch index cdc10a67bb0..4bc12362699 100644 --- a/community/mercury/0002-always-build-shared-libs.patch +++ b/community/mercury/0002-always-build-shared-libs.patch @@ -1,17 +1,17 @@ -From 7bd0bb0c54b90e75e3834d32c2f01ef96cdf6eb5 Mon Sep 17 00:00:00 2001 -From: me <me> -Date: Fri, 16 Jul 2021 07:19:22 +0000 +From 7ddbed5dfbbe9050e48b5fd531d4e2e6f23125a5 Mon Sep 17 00:00:00 2001 +From: Clayton Craft <clayton@craftyguy.net> +Date: Sat, 9 Apr 2022 15:11:36 -0700 Subject: [PATCH] always build shared libs --- - configure | 251 +++++------------------------------------------------- - 1 file changed, 21 insertions(+), 230 deletions(-) + configure | 237 +++--------------------------------------------------- + 1 file changed, 10 insertions(+), 227 deletions(-) diff --git a/configure b/configure -index 135481d..417457d 100755 +index d7dbc0f..5ff47a8 100755 --- a/configure +++ b/configure -@@ -11630,7 +11630,7 @@ SHLIB_INSTALL_NAME_FLAG="-install_name " +@@ -11405,7 +11405,7 @@ SHLIB_INSTALL_NAME_FLAG="-install_name " CFLAGS_FOR_PIC="-fpic -DMR_PIC" EXT_FOR_PIC_OBJECTS=pic_o @@ -20,13 +20,13 @@ index 135481d..417457d 100755 USE_DLLS=no # The following variables specify options to $LINK_SHARED_OBJ to # allow/disallow unresolved symbols when building shared libraries. -@@ -11639,235 +11639,26 @@ ERROR_UNDEFINED="" +@@ -11414,241 +11414,24 @@ ERROR_UNDEFINED="" DEFAULT_LINKAGE="shared" if test "$mercury_cv_enable_shared_libs" = "yes"; then - case "$host" in - i*86-*-linux|i*86-*-linux-gnu|x86_64-*-linux*) -- case $ac_cv_c_compiler_gnu in +- case "$ac_cv_c_compiler_gnu" in - yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } @@ -80,7 +80,9 @@ index 135481d..417457d 100755 -$as_echo "no" >&6; } - ;; - esac -- ++ SHARED_LIBS="$SHARED_LIBS $ld_linux" ++ SHARED_LIBS_SH="$SHARED_LIBS_SH $ld_linux" + - # On x86_64 machines we use -fPIC rather than -fpic - # in order to avoid limits on the size of the global - # offset table implied by the latter. @@ -95,6 +97,19 @@ index 135481d..417457d 100755 -$as_echo "yes" >&6; } - EXT_FOR_SHARED_LIB=so - ;; +- aarch64*-linux|aarch64*-linux-gnu) +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- # On aarch64 machines we must use -fPIC rather than -fpic in order +- # to avoid limits on the size of the global offset table. ++ # On x86_64 machines we use -fPIC rather than -fpic ++ # in order to avoid limits on the size of the global ++ # offset table implied by the latter. ++ case "$host" in ++ x86_64-*-linux*) + CFLAGS_FOR_PIC="-fPIC -DMR_PIC" +- EXT_FOR_SHARED_LIB=so +- ;; - *-freebsd*) - # Tested on FreeBSD 10.1 i386/amd64. - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -232,16 +247,16 @@ index 135481d..417457d 100755 -$as_echo "no" >&6; } - ;; - esac -- ;; -- arm*-linux|arm*-linux-gnu) + ;; + arm*-linux|arm*-linux-gnu) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - EXT_FOR_SHARED_LIB=so -- # One can build gcc with a default PIC register other than sl -- # so let's force it. If you change this, -- # update MR_ARM_PIC_REG in runtime/mercury_goto.h as well. -- CFLAGS_FOR_PIC="-mpic-register=sl $CFLAGS_FOR_PIC" -- ;; + # One can build gcc with a default PIC register other than sl + # so let's force it. If you change this, + # update MR_ARM_PIC_REG in runtime/mercury_goto.h as well. + CFLAGS_FOR_PIC="-mpic-register=sl $CFLAGS_FOR_PIC" + ;; - *) - # CFLAGS_FOR_PIC is used by boehm_gc/Makefile when creating libgc.a. - # If the system doesn't support shared libraries, @@ -251,31 +266,11 @@ index 135481d..417457d 100755 - DEFAULT_LINKAGE=static - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -- ;; -- esac -+ SHARED_LIBS="$SHARED_LIBS $ld_linux" -+ SHARED_LIBS_SH="$SHARED_LIBS_SH $ld_linux" -+ -+ # On x86_64 machines we use -fPIC rather than -fpic -+ # in order to avoid limits on the size of the global -+ # offset table implied by the latter. -+ case "$host" in -+ x86_64-*-linux*) -+ CFLAGS_FOR_PIC="-fPIC -DMR_PIC" -+ ;; -+ arm*-linux|arm*-linux-gnu) -+ # One can build gcc with a default PIC register other than sl -+ # so let's force it. If you change this, -+ # update MR_ARM_PIC_REG in runtime/mercury_goto.h as well. -+ CFLAGS_FOR_PIC="-mpic-register=sl $CFLAGS_FOR_PIC" -+ ;; -+ aarch64*-linux|aarch64*-linux-gnu) -+ CFLAGS_FOR_PIC="-mpic-register=sl $CFLAGS_FOR_PIC" -+ ;; -+ esac ++ aarch64*-linux|aarch64*-linux-gnu) ++ CFLAGS_FOR_PIC="-mpic-register=sl $CFLAGS_FOR_PIC" + ;; + esac else - # CFLAGS_FOR_PIC is used by boehm_gc/Makefile when creating libgc.a. - # If the system doesn't support shared libraries, -- -2.32.0 +2.35.1 |