Changeset 544 for trunk/aclocal.m4
- Timestamp:
- Feb 17, 2019, 2:41:49 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/aclocal.m4
r499 r544 1125 1125 AC_LANG_ASSERT(C) 1126 1126 if test "X$CC" != "X"; then 1127 AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector- all],1127 AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector-strong], 1128 1128 ssp_cv_cc, 1129 1129 [ssp_old_cflags="$CFLAGS" 1130 CFLAGS="$CFLAGS -fstack-protector- all"1130 CFLAGS="$CFLAGS -fstack-protector-strong" 1131 1131 AC_TRY_COMPILE(,, ssp_cv_cc=yes, ssp_cv_cc=no) 1132 1132 CFLAGS="$ssp_old_cflags" 1133 1133 ]) 1134 1134 if test $ssp_cv_cc = no; then 1135 AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector ],1135 AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector-all], 1136 1136 ssp_cv_cc, 1137 1137 [ssp_old_cflags="$CFLAGS" 1138 CFLAGS="$CFLAGS -fstack-protector "1138 CFLAGS="$CFLAGS -fstack-protector-all" 1139 1139 AC_TRY_COMPILE(,, ssp_cv_cc=yes, ssp_cv_cc=no) 1140 1140 CFLAGS="$ssp_old_cflags" 1141 1141 ]) 1142 if test $ssp_cv_cc = yes; then 1143 CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector" 1144 LDFLAGS="$LDFLAGS -fstack-protector" 1145 AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.]) 1142 if test $ssp_cv_cc = no; then 1143 AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector], 1144 ssp_cv_cc, 1145 [ssp_old_cflags="$CFLAGS" 1146 CFLAGS="$CFLAGS -fstack-protector" 1147 AC_TRY_COMPILE(,, ssp_cv_cc=yes, ssp_cv_cc=no) 1148 CFLAGS="$ssp_old_cflags" 1149 ]) 1150 if test $ssp_cv_cc = yes; then 1151 CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector" 1152 LDFLAGS="$LDFLAGS -fstack-protector" 1153 AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.]) 1154 fi 1155 else 1156 if test $ssp_cv_cc = yes; then 1157 CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all" 1158 LDFLAGS="$LDFLAGS -fstack-protector-all" 1159 AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.]) 1160 fi 1146 1161 fi 1147 1162 else 1148 1163 if test $ssp_cv_cc = yes; then 1149 CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector- all"1150 LDFLAGS="$LDFLAGS -fstack-protector- all"1164 CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-strong" 1165 LDFLAGS="$LDFLAGS -fstack-protector-strong" 1151 1166 AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.]) 1152 1167 fi … … 1211 1226 AC_LANG_ASSERT(C) 1212 1227 if test "X$CC" != "X"; then 1213 AC_CACHE_CHECK([whether ${CC} accepts -fstack-c heck],1228 AC_CACHE_CHECK([whether ${CC} accepts -fstack-clash-protection], 1214 1229 stackcheck_cv_cc, 1215 1230 [stackcheck_old_cflags="$CFLAGS" 1216 CFLAGS="$CFLAGS -fstack-c heck"1231 CFLAGS="$CFLAGS -fstack-clash-protection" 1217 1232 AC_TRY_COMPILE(,, stackcheck_cv_cc=yes, stackcheck_cv_cc=no) 1218 1233 CFLAGS="$stackcheck_old_cflags" 1219 1234 ]) 1220 1235 if test $stackcheck_cv_cc = yes; then 1221 CFLAGS="$CFLAGS -fstack-c heck"1236 CFLAGS="$CFLAGS -fstack-clash-protection" 1222 1237 fi 1223 1238 fi
Note:
See TracChangeset
for help on using the changeset viewer.