This allows more tcc cross compiler to work out of the box without a buildsystem-specific config-extra.mak
Unified · Split
| @@ -258,7 +258,9 @@ extern long double strtold (const char *__nptr, char **__endptr); · 257 unmodified lines | ||
| 258 | 258 | |
| 259 | 259 | /* path to find crt1.o, crti.o and crtn.o */ |
| 260 | 260 | #ifndef CONFIG_TCC_CRTPREFIX |
| 261 | −# define CONFIG_TCC_CRTPREFIX USE_TRIPLET(CONFIG_SYSROOT "/usr/" CONFIG_LDDIR) | |
| 261 | +# define CONFIG_TCC_CRTPREFIX \ | |
| 262 | + ALSO_TRIPLET(CONFIG_SYSROOT "/usr/" CONFIG_LDDIR) \ | |
| 263 | + ":" USE_TRIPLET(CONFIG_SYSROOT "/usr") "/lib" | |
| 262 | 264 | #endif |
| 263 | 265 | |
| 264 | 266 | #ifndef CONFIG_USR_INCLUDE |
| @@ -275,6 +277,8 @@ extern long double strtold (const char *__nptr, char **__endptr); · 10 unmodified lines | ||
| 275 | 277 | # define CONFIG_TCC_SYSINCLUDEPATHS \ |
| 276 | 278 | "{B}/include" \ |
| 277 | 279 | ":" ALSO_TRIPLET(CONFIG_SYSROOT "/usr/local/include") \ |
| 280 | + ":" USE_TRIPLET(CONFIG_SYSROOT "/usr") "/include" \ | |
| 281 | + ":" USE_TRIPLET(CONFIG_SYSROOT "/usr/local") "/include" \ | |
| 278 | 282 | ":" ALSO_TRIPLET(CONFIG_SYSROOT CONFIG_USR_INCLUDE) |
| 279 | 283 | # endif |
| 280 | 284 | #endif |
| @@ -286,6 +290,8 @@ extern long double strtold (const char *__nptr, char **__endptr); · 5 unmodified lines | ||
| 286 | 290 | # else |
| 287 | 291 | # define CONFIG_TCC_LIBPATHS \ |
| 288 | 292 | ALSO_TRIPLET(CONFIG_SYSROOT "/usr/" CONFIG_LDDIR) \ |
| 293 | + ":" USE_TRIPLET(CONFIG_SYSROOT "/usr") "/lib" \ | |
| 294 | + ":" USE_TRIPLET(CONFIG_SYSROOT "/usr/local") "/lib" \ | |
| 289 | 295 | ":" ALSO_TRIPLET(CONFIG_SYSROOT "/" CONFIG_LDDIR) \ |
| 290 | 296 | ":" ALSO_TRIPLET(CONFIG_SYSROOT "/usr/local/" CONFIG_LDDIR) |
| 291 | 297 | # endif |