nasm: error: unrecognised option `-m' compilation on i686

Andreas Baumann <[email protected]> Thu, 10 Mar 2022 10:11:00 +0100
Newsgroups gmane.comp.audio.compression.flac.devel
Message-ID <YinApIbERg73pAdc@eurox>
Hi,

When compiling on IA32 I get a nasm option -mstackrealign which
results in 'nasm: error: unrecognised option `-m'.

I believe that the compile option -mstackrealign is meant
to be used only for C, so I propose the following patch:

diff -rauN flac-1.3.4/CMakeLists.txt flac-1.3.4-no-mstackrealign-for-nasm-patch/CMakeLists.txt
--- flac-1.3.4/CMakeLists.txt   2022-02-14 06:21:14.011609811 +0100
+++ flac-1.3.4-no-mstackrealign-for-nasm-patch/CMakeLists.txt   2022-03-10 09:54:48.719704370 +0100
@@ -97,7 +97,7 @@
 endif()

 if(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND HAVE_STACKREALIGN_FLAG)
-    add_compile_options(-mstackrealign)
+    add_compile_options($<$<COMPILE_LANGUAGE:C>:-mstackrealign>)
 endif()

 include_directories("include")

Cheers

Andreas

--
Andreas Baumann
Trottenstrasse 20
CH-8037 Zuerich
Telefon: +41(0)76/373 01 29
E-mail: [email protected]
Homepage: www.andreasbaumann.cc

_______________________________________________
flac-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/flac-dev
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEOKymoCbSXN0ifSSDL2OZ3NIhIZUFAmIpwKAACgkQL2OZ3NIh
IZU+7wgAzMGj/15bx49pTFx5AFGqBK2vUqVt6t+6Do5MHg+F6evvfwu2gNzttO7v
Gw/HejXpvH/dJ1xB/db8DjWaBhuXDoHqyq+6IS8/X83zkbo85TgnASAenycDpYdK
9NV9AVePY6ZE/TfxRn6/7xM+J3PpWyMWah4k3bZxmQkxbUdG88kkMzbTn0zVRjym
I1Uy+muTQ+IUpUqc0XPS5II90ZDRUTiNShAFpvgWMEcRa476edD0wWauwQfKQ9ND
fbmrVByYsyQzamgsfJU8EO1qlZ4YJ1YRCtUkvDLqGignueTWZPCetHVQ/AkiKhkP
LkeY34U3e/mh3QrZf0ajUUN3n6Y4eA==
=IV+w
-----END PGP SIGNATURE-----