From 01a30de9b6be4b43c27b15fe0b8013e5b1907800 Mon Sep 17 00:00:00 2001 From: jca Date: Thu, 12 Oct 2017 15:04:52 +0000 Subject: [PATCH] Don't hardcode libstdc++, fixes build on systems which don't provide it clang ignores -lstdc++ even if it is absent from the system, giving the wrong hint to the configure, which proceeds to add it to the list of libraries. Then libtool fails because it can't find it. Why is clang ignoring -lstdc++? Convenience? --- audio/adplug/patches/patch-configure | 57 ++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 audio/adplug/patches/patch-configure diff --git a/audio/adplug/patches/patch-configure b/audio/adplug/patches/patch-configure new file mode 100644 index 00000000000..6bb25ef2921 --- /dev/null +++ b/audio/adplug/patches/patch-configure @@ -0,0 +1,57 @@ +$OpenBSD: patch-configure,v 1.1 2017/10/12 15:04:52 jca Exp $ + +XXX libstdc++ detected even if not present + +Index: configure +--- configure.orig ++++ configure +@@ -15013,49 +15013,6 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + # Check for needed libraries. +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lstdc++" >&5 +-$as_echo_n "checking for main in -lstdc++... " >&6; } +-if test "${ac_cv_lib_stdcpp_main+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lstdc++ $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +- +-int +-main () +-{ +-return main (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_cxx_try_link "$LINENO"; then : +- ac_cv_lib_stdcpp_main=yes +-else +- ac_cv_lib_stdcpp_main=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdcpp_main" >&5 +-$as_echo "$ac_cv_lib_stdcpp_main" >&6; } +-if test "x$ac_cv_lib_stdcpp_main" = x""yes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_LIBSTDC__ 1 +-_ACEOF +- +- LIBS="-lstdc++ $LIBS" +- +-else +- as_fn_error "libstdc++ not installed" "$LINENO" 5 +-fi +- +- +- + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.