WIP MachO binutils port assisted by AI I may consider upstreaming this in the future.
0

Configure Feed

Select the types of activity you want to include in your feed.

GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPs

Check if host supports multi-byte NOPs before enabling CET on host.

config/

PR binutils/27397
* cet.m4 (GCC_CET_HOST_FLAGS): Check if host supports multi-byte
NOPs.

libiberty/

PR binutils/27397
* configure: Regenerated.

H.J. Lu (Mar 18, 2021, 8:02 AM -0700) 538c15fc 835f2fae

+56 -3
+6
config/ChangeLog
··· 1 + 2021-03-18 H.J. Lu <hongjiu.lu@intel.com> 2 + 3 + PR binutils/27397 4 + * cet.m4 (GCC_CET_HOST_FLAGS): Check if host supports multi-byte 5 + NOPs. 6 + 1 7 2021-02-13 Mike Frysinger <vapier@gentoo.org> 2 8 3 9 * debuginfod.m4: Delete m4_include(../config/pkg.m4).
+16 -3
config/cet.m4
··· 130 130 if test x$may_have_cet = xyes; then 131 131 if test x$cross_compiling = xno; then 132 132 AC_TRY_RUN([ 133 + int 134 + main () 135 + { 136 + asm ("endbr32"); 137 + return 0; 138 + } 139 + ], 140 + [have_multi_byte_nop=yes], 141 + [have_multi_byte_nop=no]) 142 + have_cet=no 143 + if test x$have_multi_byte_nop = xyes; then 144 + AC_TRY_RUN([ 133 145 static void 134 146 foo (void) 135 147 { ··· 155 167 bar (); 156 168 return 0; 157 169 } 158 - ], 159 - [have_cet=no], 160 - [have_cet=yes]) 170 + ], 171 + [have_cet=no], 172 + [have_cet=yes]) 173 + fi 161 174 if test x$enable_cet = xno -a x$have_cet = xyes; then 162 175 AC_MSG_ERROR([Intel CET must be enabled on Intel CET enabled host]) 163 176 fi
+5
libiberty/ChangeLog
··· 1 + 2021-03-18 H.J. Lu <hongjiu.lu@intel.com> 2 + 3 + PR binutils/27397 4 + * configure: Regenerated. 5 + 1 6 2021-01-11 H.J. Lu <hongjiu.lu@intel.com> 2 7 3 8 PR ld/27173
+29
libiberty/configure
··· 5539 5539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5540 5540 /* end confdefs.h. */ 5541 5541 5542 + int 5543 + main () 5544 + { 5545 + asm ("endbr32"); 5546 + return 0; 5547 + } 5548 + 5549 + _ACEOF 5550 + if ac_fn_c_try_run "$LINENO"; then : 5551 + have_multi_byte_nop=yes 5552 + else 5553 + have_multi_byte_nop=no 5554 + fi 5555 + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 5556 + conftest.$ac_objext conftest.beam conftest.$ac_ext 5557 + fi 5558 + 5559 + have_cet=no 5560 + if test x$have_multi_byte_nop = xyes; then 5561 + if test "$cross_compiling" = yes; then : 5562 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 5563 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 5564 + as_fn_error $? "cannot run test program while cross compiling 5565 + See \`config.log' for more details" "$LINENO" 5; } 5566 + else 5567 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5568 + /* end confdefs.h. */ 5569 + 5542 5570 static void 5543 5571 foo (void) 5544 5572 { ··· 5575 5603 conftest.$ac_objext conftest.beam conftest.$ac_ext 5576 5604 fi 5577 5605 5606 + fi 5578 5607 if test x$enable_cet = xno -a x$have_cet = xyes; then 5579 5608 as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5 5580 5609 fi