Skip to content

Commit 36cbb99

Browse files
authored
rpm: let CMake assemble with gcc on el8 (#75)
`-DCMAKE_ASM_COMPILER=.../as` hands libffi's preprocessed `.S` sources to the bare assembler, which reads CMake's `-D` definitions as `--defsym` and stops the el8 build: Building ASM object .../libffi/.../src/x86/unix64.S.o Fatal error: bad defsym; format is --defsym name=value Without the override CMake takes the ASM compiler from `CMAKE_C_COMPILER`, the gcc-toolset-11 gcc. Verified with a full build in the build-deps:el8 image. Assisted-by: Claude Opus 5.5 (1M context)
1 parent 024663d commit 36cbb99

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎rpm/SPECS/openmodelica.spec.tpl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ BuildRequires: libarchive >= 3.3.3
9393
%{?el8:Requires: gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-gcc-gfortran}
9494
%if 0%{?rhel} == 8
9595
BuildRequires: gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-gcc-gfortran
96-
%define devtoolscmakeflags -DCMAKE_C_COMPILER=/opt/rh/gcc-toolset-11/root/usr/bin/gcc -DCMAKE_CXX_COMPILER=/opt/rh/gcc-toolset-11/root/usr/bin/g++ -DCMAKE_Fortran_COMPILER=/opt/rh/gcc-toolset-11/root/usr/bin/gfortran -DCMAKE_ASM_COMPILER=/opt/rh/gcc-toolset-11/root/usr/bin/as
96+
%define devtoolscmakeflags -DCMAKE_C_COMPILER=/opt/rh/gcc-toolset-11/root/usr/bin/gcc -DCMAKE_CXX_COMPILER=/opt/rh/gcc-toolset-11/root/usr/bin/g++ -DCMAKE_Fortran_COMPILER=/opt/rh/gcc-toolset-11/root/usr/bin/gfortran
9797
%endif
9898

9999
%if 0%{?omnogui}

0 commit comments

Comments
 (0)