internal/rosa: patch header search paths
All checks were successful
Test / Create distribution (push) Successful in 49s
Test / Sandbox (push) Successful in 2m35s
Test / ShareFS (push) Successful in 4m0s
Test / Hpkg (push) Successful in 4m41s
Test / Sandbox (race detector) (push) Successful in 5m6s
Test / Hakurei (race detector) (push) Successful in 6m11s
Test / Hakurei (push) Successful in 2m39s
Test / Flake checks (push) Successful in 3m50s
All checks were successful
Test / Create distribution (push) Successful in 49s
Test / Sandbox (push) Successful in 2m35s
Test / ShareFS (push) Successful in 4m0s
Test / Hpkg (push) Successful in 4m41s
Test / Sandbox (race detector) (push) Successful in 5m6s
Test / Hakurei (race detector) (push) Successful in 6m11s
Test / Hakurei (push) Successful in 2m39s
Test / Flake checks (push) Successful in 3m50s
This removes the need for reference CFLAGS in the standard toolchain. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user