History

tcc.h: Extend search path for include, lib and crt.

This allows more tcc cross compiler to work out of the box without a buildsystem-specific config-extra.mak

Detlef Riekenberg committed 4 years ago

Commit fa9c31c1 parent 9ac128c1 file · +7 −1Browse files

Unified · Split

tcc.h+7−1
@@ -258,7 +258,9 @@ extern long double strtold (const char *__nptr, char **__endptr); · 257 unmodified lines
258258
259259 /* path to find crt1.o, crti.o and crtn.o */
260260 #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"
262264 #endif
263265
264266 #ifndef CONFIG_USR_INCLUDE
@@ -275,6 +277,8 @@ extern long double strtold (const char *__nptr, char **__endptr); · 10 unmodified lines
275277 # define CONFIG_TCC_SYSINCLUDEPATHS \
276278 "{B}/include" \
277279 ":" ALSO_TRIPLET(CONFIG_SYSROOT "/usr/local/include") \
280+ ":" USE_TRIPLET(CONFIG_SYSROOT "/usr") "/include" \
281+ ":" USE_TRIPLET(CONFIG_SYSROOT "/usr/local") "/include" \
278282 ":" ALSO_TRIPLET(CONFIG_SYSROOT CONFIG_USR_INCLUDE)
279283 # endif
280284 #endif
@@ -286,6 +290,8 @@ extern long double strtold (const char *__nptr, char **__endptr); · 5 unmodified lines
286290 # else
287291 # define CONFIG_TCC_LIBPATHS \
288292 ALSO_TRIPLET(CONFIG_SYSROOT "/usr/" CONFIG_LDDIR) \
293+ ":" USE_TRIPLET(CONFIG_SYSROOT "/usr") "/lib" \
294+ ":" USE_TRIPLET(CONFIG_SYSROOT "/usr/local") "/lib" \
289295 ":" ALSO_TRIPLET(CONFIG_SYSROOT "/" CONFIG_LDDIR) \
290296 ":" ALSO_TRIPLET(CONFIG_SYSROOT "/usr/local/" CONFIG_LDDIR)
291297 # endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t