Building
- gcc-10 linker failure: "multiple definition of...".
syslinux-6.04_pre1 fails to build on gcc-10 due to -fno-common change; gcc-10 (and above) flipped a default, from -fcommon to -fno-common.
gcc-10 will reject multiple definitions of global variables. Possible/potential workaround: add/append -fcommon to CFLAGS. Ideally, the code would need a few 'extern' additions and maybe moving variable definitions.
-
undefined reference to `strlen'
. Possibly related to (the link to) libc and/or to GCC-10+ optimizer. Solution: provide missingstrlen()
implementation indos/string.h
. - Prevent-pow-optimization when using gcc 8.2+.
-
internal error - lzo_init() failed!
(inconsistent/sporadic error).Syslinux fails to build due to aliasing bugs in lzo. Add
References:-fno-strict-aliasing
tolzo/Makefile
. - Fix broken efi binaries with binutils 2.31+.
"Binutils >= 2.31 writes two PT_LOAD segments by default. This is not supported by the wrapper.c script used to convert the shared object into an elf binary."
References: - If getting "Not enough room for program headers", try adding '--no-dynamic-linker' to the linker command line(s). Seen with binutils 2.27+. There might be other / better solutions / work-around methods.
Note: 6.04-pre1+ should not be affected by this issue.
Feedback is appreciated.
- When building with glibc 2.23+, the "major", "minor" and "makedev" functions are defined in "sys/sysmacros.h". The patch "extlinux: pull in sys/sysmacros.h for major/minor/makedev", applied to Syslinux during 2016Apr, should help. Please note that not only Syslinux is affected by this change in glibc.
Patches already included in Syslinux 6.04-pre1
(released 2016Mar):
- Building Syslinux 6.03 with gcc5+:
- Use -mno-red-zone for EFI
- Syslinux 6.03 might fail to boot in some hardware (e.g. some Chromebooks). The patch "relocate protected-mode code as intended", applied to Syslinux during 2015Apr, might help.
Testing Syslinux 6.04-pre1 (or later) is recommended.
Other
- NASM 2.11.06 has a bug which prevents Syslinux from building correctly. Use other version of NASM (e.g. 2.11.05, 2.11.08+, among others).
- binutils 2.26, as originally released upstream, has a bug preventing Syslinux from building correctly. The bug in bintuils 2.26 was resolved in a later commit.
- "error: impossible constraint in asm". When gcc5+ is configured with --enable-default-pie, in some cases there might be a need to use custom flags in some makefile(s), similar to either "
CFLAGS += -fno-pie
" or "CFLAGS := -fno-pie
". Examples: