mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-13 03:09:51 +03:00
split out -headers to a separate aport so check() can use the headers from their usual location (formerly, check() relied on relative paths of these headers within $builddir, which means if anything goes wrong while installing the headers, check() will still pass), moreover upstream does not recommend keeping the relative search path in packaged executables (see comment in platform/linux-alpine.c) as it essentially allows anything placed in that path to override system headers.
23 lines
771 B
Diff
23 lines
771 B
Diff
--- a/platform/linux-alpine.c
|
|
+++ b/platform/linux-alpine.c
|
|
@@ -14,19 +14,7 @@ void platform_init(void) {
|
|
}
|
|
|
|
void platform_stdinc_paths(StringArray *paths) {
|
|
- // Replace this block with absolute path if you intend to
|
|
- // execute the compiler outside of source directory.
|
|
- // If you are thinking of just removing the error while keeping
|
|
- // the relative search path, please read:
|
|
- // https://github.com/rui314/chibicc/issues/162
|
|
- {
|
|
- char *hdr_dir = format("%s/slimcc_headers", dirname(strdup(argv0)));
|
|
- if (!file_exists(hdr_dir))
|
|
- error("can't find built-in headers");
|
|
-
|
|
- add_include_path(paths, format("%s/include", hdr_dir));
|
|
- }
|
|
-
|
|
+ add_include_path(paths, "/usr/lib/slimcc/include");
|
|
add_include_path(paths, "/usr/include");
|
|
}
|
|
|