package/e2fsprogs: fix compile error for SH

Compile of e2fsprogs is failing because of gcc bug
111001. Workaround it by forcing the usage of -Os.

Compile fails with:
	CC rw_bitmaps.c
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
during RTL pass: sh_treg_combine2
rw_bitmaps.c: In function 'read_bitmaps_range_start':
rw_bitmaps.c:447:1: internal compiler error: Aborted
  447 | }
      | ^
0x5e7a6f ???
	../sysdeps/aarch64/start.S:81
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <http://bugs.buildroot.net/> for instructions.

No need to backport, because gcc 13.2.0 was introduced recently in
Buildroot commit: 3009095ba8

Fixes:
 - http://autobuild.buildroot.net/results/fb7/fb7e9c8b02b979b3a75185c0afa4ab0ca654f6f6
 - http://autobuild.buildroot.net/results/659/659313b1783db491653bcc85b37da40c7b077225

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
master
Waldemar Brodkorb 2023-08-12 13:46:06 +02:00 committed by Thomas Petazzoni
parent 61f79aa13d
commit 35749826b4
1 changed files with 5 additions and 0 deletions

View File

@ -70,6 +70,11 @@ ifeq ($(BR2_nios2),y)
E2FSPROGS_CONF_ENV += ac_cv_func_fallocate=no
endif
# workaround gcc bug 111001
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_111001),y)
E2FSPROGS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Os"
endif
E2FSPROGS_CONF_ENV += ac_cv_path_LDCONFIG=true
HOST_E2FSPROGS_CONF_ENV += ac_cv_path_LDCONFIG=true