Skip to contentSkip to conversation

ipl: Ensure no GCC builtins replace string functions

PATCH In review Jeroen Roovers 2 participants 2 messages May 20, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipl: Ensure no GCC builtins replace string functions

With GCC 10, the ipl is built with the compiler overriding local definitions of some string functions, causing the ipl to trigger an HPMC. Fix this by setting the -fno-builtin compiler flag.

---
 ipl/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ipl/Makefile +1 -1
index 913ec66..c1d608b 100644
@@ -39,7 +39,7 @@ endif
 VPATH=../lib:.
 
 AFLAGS	= -I../lib
-CFLAGS	= -DIPL_LOADER -I. -I../lib -I../include -O2 -mdisable-fpregs -Wall -fno-delete-null-pointer-checks
+CFLAGS	= -DIPL_LOADER -I. -I../lib -I../include -O2 -mdisable-fpregs -Wall -fno-delete-null-pointer-checks -fno-builtin
 LDFLAGS  = -N --section-start .init=0x60000 -e '$$START$$'
 
 all:	iplelf
Signature · 1 line
2.26.2
#1 lore raw
Quoted 5 lines · Jeroen Roovers

With GCC 10, the ipl is built with the compiler overriding local definitions of some string functions, causing the ipl to trigger an HPMC. Fix this by setting the -fno-builtin compiler flag.

Thanks Jeroen!

I've applied your patch and am preparing for a palo v2.13 release...

Helge

Quoted 18 lines
---
 ipl/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ipl/Makefile +1 -1
index 913ec66..c1d608b 100644
@@ -39,7 +39,7 @@ endif
 VPATH=../lib:.
 
 AFLAGS	= -I../lib
-CFLAGS	= -DIPL_LOADER -I. -I../lib -I../include -O2 -mdisable-fpregs -Wall -fno-delete-null-pointer-checks
+CFLAGS	= -DIPL_LOADER -I. -I../lib -I../include -O2 -mdisable-fpregs -Wall -fno-delete-null-pointer-checks -fno-builtin
 LDFLAGS  = -N --section-start .init=0x60000 -e '$$START$$'
 
 all:	iplelf