chiark / gitweb /
Disable -flto
authorAndy Wingo <wingo@pobox.com>
Mon, 20 Apr 2015 20:08:33 +0000 (22:08 +0200)
committerAndy Wingo <wingo@pobox.com>
Mon, 20 Apr 2015 20:08:33 +0000 (22:08 +0200)
With binutils 2.25, the following error occurred:

/tmp/ccx3cAlA.ltrans10.ltrans.o: In function `bus_error_name_to_errno.5271':
/home/wingo/src/elogind/src/libelogind/sd-bus/bus-error.c:113: undefined reference to `__stop_BUS_ERROR_MAP'
/home/wingo/src/elogind/src/libelogind/sd-bus/bus-error.c:113: undefined reference to `__start_BUS_ERROR_MAP'
collect2: error: ld returned 1 exit status

configure.ac

index 8c37ca3a78d1a5eab4d9398870e38a88cced8166..b8351f397f418e0cca0bfe8f956dab6cda60e521 100644 (file)
@@ -191,11 +191,11 @@ AS_CASE([$CC], [*clang*],
                -Wno-gnu-variable-sized-type-not-at-end \
         ])])
 
-AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
-        [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-               -flto -ffat-lto-objects])],
-        [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
-AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
+dnl AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
+dnl         [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
+dnl                -flto -ffat-lto-objects])],
+dnl         [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
+dnl AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
 
 AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
         [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\