-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-march=native
is not supported on all architectures
#185
Comments
Yeah I recently learned about |
Okay, I'm going to patch this in the Debian package waiting for this rewrite, since this only affects exotic architectures. As always, feel free to ping me if you need help! (I'll try to reply in less than two months this time :p) Feel free to close this whenever you prefer :) |
Just finished the re-write, everything should be much simpler and less hacky (i.e. things that are supposed to be handled at the CI level are now handled there, lol). You may want to give it a look to verify I haven't broken various things, though. |
Il giorno dom 22 gen 2023 alle 11:53:34 -08:00:00, Mark Gillard
***@***.***> ha scritto:
That surely is a rewrite!
Had a brief look, and it looks good. Just some notes:
- Wrapping defines like '-DTOML_HEADER_ONLY=0' in
cpp.get_supported_arguments() might be overkill, as virtually all
compilers support the -D notation (MSVC too if I recall correctly). It
also technically slows down the configure step, as Meson has to perform
an additional check.
- Using files() when passing relative filenames to library() isn't
needed, as e.g. 'toml.cpp' will get immediately consumed by library().
files() is useful when passing file names around in variables/arrays,
e.g. when you add 'toml.cpp' to the array the include/ subdirectory and
want to reference it in the src/ subdirectory.
But as you can see, these are almost useless nitpicks. Good job, and
thank you!
…--
OpenPGP key: 66DE F152 8299 0C21 99EF A801 A8A1 28A8 AB1C EE49
|
Hi, the meson.build files currently add
-march=native
when the compiler is detected as GCC or Clang; unfortunately, the flag isn't available on all GCC's supported targets, so compilation currently fails on Debian's ia64, mipsel, powerpc, ppc64, ppc64el, riscv64 and sparc64 architectures; you can find the build logs at https://buildd.debian.org/status/logs.php?pkg=tomlplusplus&ver=3.2.0%2Bds-2tomlplusplus/meson.build
Lines 62 to 64 in 698285d
I can think of two possible solutions:
is_gcc or is_clang
check, and instead writedevel_args += compiler.get_supported_arguments('-march=native')
(see the docs). This could be done for pretty much all the added compiler flags by the way.-march=native
altogetherPS: yes, I don't know if I've mentioned this before but tomlplusplus is now packaged by Debian :)
The text was updated successfully, but these errors were encountered: