chiark / gitweb /
build-sys: disable _FORTIFY_SOURCE for -Og builds for now
authorKay Sievers <kay@vrfy.org>
Mon, 21 Oct 2013 16:28:23 +0000 (18:28 +0200)
committerKay Sievers <kay@vrfy.org>
Mon, 21 Oct 2013 16:29:53 +0000 (18:29 +0200)
Older gcc versions throw things like:

  In file included from /usr/include/fcntl.h:302:0,
                 from ../src/core/execute.c:25:
In function 'open',
    inlined from 'open_null_as' at ../src/core/execute.c:196:12:
/usr/include/bits/fcntl2.h:50:24: error: call to '__open_missing_mode'
  declared with attribute error: open with O_CREAT in second argument needs 3 arguments
    __open_missing_mode ();

configure.ac

index b09f333a0f5c399a5ca0ca007f90dd9933762147..7e41d577bcb30736b03be1f091253cfce2dbdd96 100644 (file)
@@ -157,7 +157,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         --param=ssp-buffer-size=4])
 AC_SUBST([OUR_CFLAGS], "$with_cflags $address_sanitizer_cflags")
 
-AS_CASE([$CFLAGS], [*-O[[12345g\ ]]*],
+AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
         [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
                -Wp,-D_FORTIFY_SOURCE=2])],
         [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])