Self-defined C/C++ toolchain with "no_legacy_features" does not accept unknown features

12 views
Skip to first unread message

andreas.0...@gmail.com

unread,
3:07 AM (3 hours ago) 3:07 AM
to bazel-discuss
Hi all,

I am wrestling a problem that I have already asked in Slack: https://bazelbuild.slack.com/archives/CGA9QFQ8H/p1720100563069909.

I am trying to define a Gcc 3.4.5 based cross compile toolchain to build 32-bit binaries for an older Glibc runtime.  Unfortunately, Gcc 3.4.5 does not yet accept parameter files (using the "@<file-path>" syntax) that is enabled for the default toolchains with the "linker_param_file" feature.

Thus I a trying to create a toolchain using the "no_legacy_features" feature. I have added a minimal example and attached it.  Surprisingly, features like "default_compile_flags" or "archiver_flags" work as expected (by me), while "default_link_flags" does not.

On a rank-and-file Linux the minimal example can be run using

"bazel build --noenable_bzlmod --platforms=//bazel_utils/platforms:onepc_platform -s //:toolchain_test".

On my system result is that "CppLink" has no command line arguments (not even "-Wl,-z,now").  My config is:

$ bazel version
Bazelisk version: v1.17.0
Build label: 7.2.1
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Tue Jun 25 15:53:05 2024 (1719330785)
Build timestamp: 1719330785
Build timestamp as int: 1719330785


Thanks in advance,

Andreas

toolchain_test.tar.xz
Reply all
Reply to author
Forward
0 new messages