Changeset 156462 in webkit


Ignore:
Timestamp:
Sep 26, 2013 9:36:22 AM (11 years ago)
Author:
kov@webkit.org
Message:

[GTK] Tons of warnings caused by using FORTIFY_SOURCE in an unoptimized build
https://bugs.webkit.org/show_bug.cgi?id=121836

Patch by Gustavo Noronha Silva <gustavo.noronha@collabora.com> on 2013-09-26
Reviewed by Martin Robinson.

  • Source/autotools/SetupCompilerFlags.m4: only consider enabling FORTIFY_SOURCE if optimizations have

been enabled, since they are required for FORTIFY_SOURCE to work, and enabling FORTIFY_SOURCE unconditionally
generates warnings in newer glibc.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r156395 r156462  
     12013-09-26  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
     2
     3        [GTK] Tons of warnings caused by using FORTIFY_SOURCE in an unoptimized build
     4        https://bugs.webkit.org/show_bug.cgi?id=121836
     5
     6        Reviewed by Martin Robinson.
     7
     8        * Source/autotools/SetupCompilerFlags.m4: only consider enabling FORTIFY_SOURCE if optimizations have
     9        been enabled, since they are required for FORTIFY_SOURCE to work, and enabling FORTIFY_SOURCE unconditionally
     10        generates warnings in newer glibc.
     11
    1122013-09-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
    213
  • trunk/Source/autotools/SetupCompilerFlags.m4

    r154008 r156462  
    1414if test "$cxx_compiler" = "clang++"; then
    1515    CXXFLAGS="$CXXFLAGS -stdlib=libstdc++ -Wno-c++11-extensions -Qunused-arguments"
    16 fi
    17 
    18 if test "$c_compiler" = "gcc"; then
    19     CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
    20 fi
    21 if test "$cxx_compiler" = "g++"; then
    22     CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2"
    2316fi
    2417
     
    4134    CXXFLAGS="$CXXFLAGS -O2"
    4235    CFLAGS="$CFLAGS -O2"
     36
     37    if test "$c_compiler" = "gcc"; then
     38        CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
     39    fi
     40    if test "$cxx_compiler" = "g++"; then
     41        CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2"
     42    fi
    4343else
    4444    CXXFLAGS="$CXXFLAGS -O0"
Note: See TracChangeset for help on using the changeset viewer.