-
Notifications
You must be signed in to change notification settings - Fork 124
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
build: Check for --undefined-version support #491
build: Check for --undefined-version support #491
Conversation
meson.build
Outdated
have_version_script = cc.links( | ||
'int main(){}', | ||
args: '-Wl,--undefined-version,--version-script=' + meson.current_source_dir()/'xkbcommon.map', | ||
args: '-Wl,--version-script=' + meson.current_source_dir()/'xkbcommon.map' + extra_linker_args, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw, meson has for quite a while supported f-strings so this may be easier as:
args: '-Wl,--version-script=' + meson.current_source_dir()/'xkbcommon.map' + extra_linker_args, | |
args: f'-Wl,--version-script=@map@@extra_linker_args@', |
with an extra
map = meson.current_source_dir()/'xkbcommon.map
above somewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@whot Good idea. I raised minimal meson version from 0.52
(October 2019) to 0.58
(May 2021) to enable f-strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that #313 updated to a meson version of barely one year old at that time, I guess 3 years old is OK here.
7d4649e
to
7e3244d
Compare
This will enable f-strings and allow us to simplify the build file.
Gate the use of `--undefined-version` in the linker because it breaks on older GNU `ld`: https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=58272.
7e3244d
to
d0b7108
Compare
Gate the use of
--undefined-version
in the linker because it breaks on older GNUld
: https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=58272.Fixes #481
@glechapelain @eli-schwartz