Clover build on r5158++ : GCC131 Compil error due to unrecognized switch '--no-warn-rwx-segments' in 'Conf/tools_def.template'
matxpa opened this issue ยท 1 comments
@SergeySlice @jief666 @chris1111
buildme (with different commits since 20240511, ... F.Y.I : local CloverBootloader repo is uptodate)
Compil error due to unrecognized switch '--no-warn-rwx-segments' in 'Conf/tools_def.template'
๐ Clover r5158 (SHA: a957b87fe)
Default TOOLCHAIN: GCC131
...
- build Clover (Default Toolchain) --> GCC131
...
Running edk2 build for CloverX64 using the command:
build --cmd-len=50000 -D NO_GRUB_DRIVERS_EMBEDDED -D LESS_DEBUG --conf=~/CloverBootloader/Conf -D USE_LOW_EBDA -p Clover.dsc -a X64 -b RELEASE -t GCC131 -n 5
Build environment: macOS-12.7.5-x86_64-i386-64bit
Build start time: 11:29:23, May.13 2024
WORKSPACE = ~/CloverBootloader
EDK_TOOLS_PATH = ~/CloverBootloader/BaseTools
CONF_PATH = /CloverBootloader/Conf
PYTHON_COMMAND = python3
Processing meta-data .
Architecture(s) = X64
Build target = RELEASE
Toolchain = GCC131
...
[CC] DebugImageInfo
[CC] InstallConfigurationTable
~/src/opt/local/cross/lib/gcc/x86_64-clover-linux-gnu/11.2.0/../../../../x86_64-clover-linux-gnu/bin/ld: unrecognized option '--no-warn-rwx-segments'
...
if you remove "--no-warn-rwx-segments" switch from code line 2101 in "/.../CloverBootloader/BaseTools/Conf/tools_def.template"
DEFINE GCC131_IA32_X64_DLINK_COMMON = -nostdlib -Wl,--no-warn-rwx-segments,--gc-sections,-n,-q,--gc-sections,-z,common-page-size=0x40,--defsym=PECOFF_HEADER_SIZE=0x240,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds
___________________
The result is
...
-
Done -
Build end time: 12:00:07, May.13 2024
Build total time: 00:03:33-> CloverX64-RELEASE_GCC131-20240512162150-a957b87-dirty.efi
adding: ~/CloverBootloader/Build/CloverX64-RELEASE_GCC131-20240512162150-a957b87-dirty.efi (deflated 52%)
...
Done!
- Clover build process took 3m36s to complete...
@jief666 : sorry may be it's not the best way to resolve this problem
Regards
It means your gcc is not right. The option works as is with gcc-13.1.0.