diff options
author | Mauricio Collares <mauricio@collares.org> | 2021-04-21 20:05:48 -0300 |
---|---|---|
committer | Masanori Ogino <167209+omasanori@users.noreply.github.com> | 2021-04-22 09:01:30 +0900 |
commit | cd7cf5942b4e366f9058affeb90178dcc4dde858 (patch) | |
tree | 258fec0c188bb9e51044753029223a93c0ef0385 /pkgs/applications/science | |
parent | aebef1703fafa705282df3ece34121f18b9a1b1f (diff) |
singular: use older autoconf macro to unbreak aarch64
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r-- | pkgs/applications/science/math/singular/default.nix | 6 | ||||
-rw-r--r-- | pkgs/applications/science/math/singular/use-older-ax-prog-cc-for-build.patch | 194 |
2 files changed, 200 insertions, 0 deletions
diff --git a/pkgs/applications/science/math/singular/default.nix b/pkgs/applications/science/math/singular/default.nix index 172004b9e094f..9a1d631692121 100644 --- a/pkgs/applications/science/math/singular/default.nix +++ b/pkgs/applications/science/math/singular/default.nix @@ -51,6 +51,12 @@ stdenv.mkDerivation rec { patches = [ # add aarch64 support to cpu-check.m4. copied from redhat. ./redhat-aarch64.patch + + # the newest version of ax-prog-cc-for-build.m4 seems to trigger + # linker errors. see + # https://github.com/alsa-project/alsa-firmware/issues/3 for a + # related issue. + ./use-older-ax-prog-cc-for-build.patch ] ++ lib.optionals enableDocs [ # singular supports building without 4ti2, bertini, normaliz or # topcom just fine, but the docbuilding does not skip manual pages diff --git a/pkgs/applications/science/math/singular/use-older-ax-prog-cc-for-build.patch b/pkgs/applications/science/math/singular/use-older-ax-prog-cc-for-build.patch new file mode 100644 index 0000000000000..f664378617cfc --- /dev/null +++ b/pkgs/applications/science/math/singular/use-older-ax-prog-cc-for-build.patch @@ -0,0 +1,194 @@ +diff --git a/m4/ax_prog_cc_for_build.m4 b/m4/ax_prog_cc_for_build.m4 +index f7410d74b..12cb005a5 100644 +--- a/m4/ax_prog_cc_for_build.m4 ++++ b/m4/ax_prog_cc_for_build.m4 +@@ -32,35 +32,31 @@ + # and this notice are preserved. This file is offered as-is, without any + # warranty. + +-#serial 18 ++#serial 9 + + AU_ALIAS([AC_PROG_CC_FOR_BUILD], [AX_PROG_CC_FOR_BUILD]) + AC_DEFUN([AX_PROG_CC_FOR_BUILD], [dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_PROG_CPP])dnl +-AC_REQUIRE([AC_CANONICAL_BUILD])dnl ++AC_REQUIRE([AC_EXEEXT])dnl ++AC_REQUIRE([AC_CANONICAL_HOST])dnl + + dnl Use the standard macros, but make them use other variable names + dnl + pushdef([ac_cv_prog_CPP], ac_cv_build_prog_CPP)dnl +-pushdef([ac_cv_prog_cc_c89], ac_cv_build_prog_cc_c89)dnl + pushdef([ac_cv_prog_gcc], ac_cv_build_prog_gcc)dnl + pushdef([ac_cv_prog_cc_works], ac_cv_build_prog_cc_works)dnl + pushdef([ac_cv_prog_cc_cross], ac_cv_build_prog_cc_cross)dnl + pushdef([ac_cv_prog_cc_g], ac_cv_build_prog_cc_g)dnl +-pushdef([ac_cv_c_compiler_gnu], ac_cv_build_c_compiler_gnu)dnl + pushdef([ac_cv_exeext], ac_cv_build_exeext)dnl + pushdef([ac_cv_objext], ac_cv_build_objext)dnl + pushdef([ac_exeext], ac_build_exeext)dnl + pushdef([ac_objext], ac_build_objext)dnl + pushdef([CC], CC_FOR_BUILD)dnl + pushdef([CPP], CPP_FOR_BUILD)dnl +-pushdef([GCC], GCC_FOR_BUILD)dnl + pushdef([CFLAGS], CFLAGS_FOR_BUILD)dnl + pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl +-pushdef([EXEEXT], BUILD_EXEEXT)dnl + pushdef([LDFLAGS], LDFLAGS_FOR_BUILD)dnl +-pushdef([OBJEXT], BUILD_OBJEXT)dnl + pushdef([host], build)dnl + pushdef([host_alias], build_alias)dnl + pushdef([host_cpu], build_cpu)dnl +@@ -71,29 +67,27 @@ pushdef([ac_cv_host_alias], ac_cv_build_alias)dnl + pushdef([ac_cv_host_cpu], ac_cv_build_cpu)dnl + pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl + pushdef([ac_cv_host_os], ac_cv_build_os)dnl +-pushdef([ac_tool_prefix], ac_build_tool_prefix)dnl +-pushdef([am_cv_CC_dependencies_compiler_type], am_cv_build_CC_dependencies_compiler_type)dnl +-pushdef([am_cv_prog_cc_c_o], am_cv_build_prog_cc_c_o)dnl +-pushdef([cross_compiling], cross_compiling_build)dnl ++pushdef([ac_cpp], ac_build_cpp)dnl ++pushdef([ac_compile], ac_build_compile)dnl ++pushdef([ac_link], ac_build_link)dnl + +-cross_compiling_build=no ++save_cross_compiling=$cross_compiling ++save_ac_tool_prefix=$ac_tool_prefix ++cross_compiling=no ++ac_tool_prefix= + +-ac_build_tool_prefix= +-AS_IF([test -n "$build"], [ac_build_tool_prefix="$build-"], +- [test -n "$build_alias"],[ac_build_tool_prefix="$build_alias-"]) +- +-AC_LANG_PUSH([C]) + AC_PROG_CC +-_AC_COMPILER_EXEEXT +-_AC_COMPILER_OBJEXT + AC_PROG_CPP ++AC_EXEEXT ++ ++ac_tool_prefix=$save_ac_tool_prefix ++cross_compiling=$save_cross_compiling + + dnl Restore the old definitions + dnl +-popdef([cross_compiling])dnl +-popdef([am_cv_prog_cc_c_o])dnl +-popdef([am_cv_CC_dependencies_compiler_type])dnl +-popdef([ac_tool_prefix])dnl ++popdef([ac_link])dnl ++popdef([ac_compile])dnl ++popdef([ac_cpp])dnl + popdef([ac_cv_host_os])dnl + popdef([ac_cv_host_vendor])dnl + popdef([ac_cv_host_cpu])dnl +@@ -104,33 +98,25 @@ popdef([host_vendor])dnl + popdef([host_cpu])dnl + popdef([host_alias])dnl + popdef([host])dnl +-popdef([OBJEXT])dnl + popdef([LDFLAGS])dnl +-popdef([EXEEXT])dnl + popdef([CPPFLAGS])dnl + popdef([CFLAGS])dnl +-popdef([GCC])dnl + popdef([CPP])dnl + popdef([CC])dnl + popdef([ac_objext])dnl + popdef([ac_exeext])dnl + popdef([ac_cv_objext])dnl + popdef([ac_cv_exeext])dnl +-popdef([ac_cv_c_compiler_gnu])dnl + popdef([ac_cv_prog_cc_g])dnl + popdef([ac_cv_prog_cc_cross])dnl + popdef([ac_cv_prog_cc_works])dnl +-popdef([ac_cv_prog_cc_c89])dnl + popdef([ac_cv_prog_gcc])dnl + popdef([ac_cv_prog_CPP])dnl + +-dnl restore global variables ac_ext, ac_cpp, ac_compile, +-dnl ac_link, ac_compiler_gnu (dependant on the current +-dnl language after popping): +-AC_LANG_POP([C]) +- + dnl Finally, set Makefile variables + dnl ++BUILD_EXEEXT=$ac_build_exeext ++BUILD_OBJEXT=$ac_build_objext + AC_SUBST(BUILD_EXEEXT)dnl + AC_SUBST(BUILD_OBJEXT)dnl + AC_SUBST([CFLAGS_FOR_BUILD])dnl +diff --git a/m4/ax_prog_cxx_for_build.m4 b/m4/ax_prog_cxx_for_build.m4 +index 4d976769f..17c19a89f 100644 +--- a/m4/ax_prog_cxx_for_build.m4 ++++ b/m4/ax_prog_cxx_for_build.m4 +@@ -31,7 +31,7 @@ + # and this notice are preserved. This file is offered as-is, without any + # warranty. + +-#serial 4 ++#serial 3 + + AU_ALIAS([AC_PROG_CXX_FOR_BUILD], [AX_PROG_CXX_FOR_BUILD]) + AC_DEFUN([AX_PROG_CXX_FOR_BUILD], [dnl +@@ -49,7 +49,6 @@ pushdef([ac_cv_prog_cxx_cross], ac_cv_build_prog_cxx_cross)dnl + pushdef([ac_cv_prog_cxx_g], ac_cv_build_prog_cxx_g)dnl + pushdef([CXX], CXX_FOR_BUILD)dnl + pushdef([CXXCPP], CXXCPP_FOR_BUILD)dnl +-pushdef([GXX], GXX_FOR_BUILD)dnl + pushdef([CXXFLAGS], CXXFLAGS_FOR_BUILD)dnl + pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl + pushdef([CXXCPPFLAGS], CXXCPPFLAGS_FOR_BUILD)dnl +@@ -63,25 +62,26 @@ pushdef([ac_cv_host_alias], ac_cv_build_alias)dnl + pushdef([ac_cv_host_cpu], ac_cv_build_cpu)dnl + pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl + pushdef([ac_cv_host_os], ac_cv_build_os)dnl +-pushdef([ac_tool_prefix], ac_build_tool_prefix)dnl +-pushdef([am_cv_CXX_dependencies_compiler_type], am_cv_build_CXX_dependencies_compiler_type)dnl +-pushdef([cross_compiling], cross_compiling_build)dnl ++pushdef([ac_cxxcpp], ac_build_cxxcpp)dnl ++pushdef([ac_compile], ac_build_compile)dnl ++pushdef([ac_link], ac_build_link)dnl + +-cross_compiling_build=no ++save_cross_compiling=$cross_compiling ++save_ac_tool_prefix=$ac_tool_prefix ++cross_compiling=no ++ac_tool_prefix= + +-ac_build_tool_prefix= +-AS_IF([test -n "$build"], [ac_build_tool_prefix="$build-"], +- [test -n "$build_alias"],[ac_build_tool_prefix="$build_alias-"]) +- +-AC_LANG_PUSH([C++]) + AC_PROG_CXX + AC_PROG_CXXCPP + ++ac_tool_prefix=$save_ac_tool_prefix ++cross_compiling=$save_cross_compiling ++ + dnl Restore the old definitions + dnl +-popdef([cross_compiling])dnl +-popdef([am_cv_CXX_dependencies_compiler_type])dnl +-popdef([ac_tool_prefix])dnl ++popdef([ac_link])dnl ++popdef([ac_compile])dnl ++popdef([ac_cxxcpp])dnl + popdef([ac_cv_host_os])dnl + popdef([ac_cv_host_vendor])dnl + popdef([ac_cv_host_cpu])dnl +@@ -103,10 +103,6 @@ popdef([ac_cv_prog_cxx_works])dnl + popdef([ac_cv_prog_gxx])dnl + popdef([ac_cv_prog_CXXCPP])dnl + +-dnl restore global variables (dependant on the current +-dnl language after popping): +-AC_LANG_POP([C++]) +- + dnl Finally, set Makefile variables + dnl + AC_SUBST([CXXFLAGS_FOR_BUILD])dnl |