diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-23 01:03:16 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-23 01:56:52 +0900 |
| commit | 5c127a70350c19c99bca388c94a4518d885c3ac3 (patch) | |
| tree | 60a6fe0b29894fde62e391f0825d88916c916e08 /internal/rosa/rosa.go | |
| parent | 8a26521f5b10258f817b69ad71405ff2cba267a8 (diff) | |
internal/rosa: patch header search paths
This removes the need for reference CFLAGS in the standard toolchain.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/rosa.go')
| -rw-r--r-- | internal/rosa/rosa.go | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/internal/rosa/rosa.go b/internal/rosa/rosa.go index c6799407..795394c2 100644 --- a/internal/rosa/rosa.go +++ b/internal/rosa/rosa.go @@ -63,10 +63,6 @@ func triplet() string { const ( // EnvTriplet holds the return value of triplet. EnvTriplet = "ROSA_TRIPLE" - // EnvRefCFLAGS holds toolchain-specific reference CFLAGS. - EnvRefCFLAGS = "ROSA_CFLAGS" - // EnvRefCXXFLAGS holds toolchain-specific reference CXXFLAGS. - EnvRefCXXFLAGS = "ROSA_CXXFLAGS" ) // ldflags returns LDFLAGS corresponding to triplet. @@ -85,13 +81,13 @@ func ldflags(static bool) string { return s } -// cflags is reference CFLAGS for the Rosa OS toolchain. -const cflags = "-Qunused-arguments " + +// earlyCFLAGS is reference CFLAGS for the stage3 toolchain. +const earlyCFLAGS = "-Qunused-arguments " + "-isystem/system/include" -// cxxflags returns reference CXXFLAGS for the Rosa OS toolchain corresponding -// to [runtime.GOARCH]. -func cxxflags() string { +// earlyCXXFLAGS returns reference CXXFLAGS for the stage3 toolchain +// corresponding to [runtime.GOARCH]. +func earlyCXXFLAGS() string { return "--start-no-unused-arguments " + "-stdlib=libc++ " + "--end-no-unused-arguments " + @@ -203,9 +199,6 @@ ln -vs ../usr/bin /work/bin env = fixupEnviron(env, []string{ EnvTriplet + "=" + triplet(), lcMessages, - - EnvRefCFLAGS + "=" + cflags, - EnvRefCXXFLAGS + "=" + cxxflags(), ldflags(true), }, "/system/bin", "/usr/bin", @@ -227,11 +220,6 @@ ln -vs ../usr/bin /work/bin EnvTriplet + "=" + triplet(), lcMessages, - // autotools projects act up with CFLAGS - "CC=clang " + cflags, - EnvRefCFLAGS + "=" + cflags, - "CXX=clang++ " + cxxflags(), - EnvRefCXXFLAGS + "=" + cxxflags(), ldflags(false), "AR=ar", |
