mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-13 05:10:07 +08:00
Makefile: allow CONFIG_LDDIR=lib64 configuration
This commit is contained in:
parent
4c2941d248
commit
3186455599
16
Makefile
16
Makefile
@ -43,17 +43,19 @@ endif
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),i386)
|
ifeq ($(ARCH),i386)
|
||||||
NATIVE_DEFINES=-DTCC_TARGET_I386
|
NATIVE_DEFINES=-DTCC_TARGET_I386
|
||||||
NATIVE_DEFINES+=$(if $(wildcard /lib/i386-linux-gnu),-DCONFIG_MULTIARCHDIR=\"i386-linux-gnu\")
|
NATIVE_DEFINES+=\
|
||||||
NATIVE_DEFINES+=$(if $(wildcard /lib/i386-kfreebsd-gnu),-DCONFIG_MULTIARCHDIR=\"i386-kfreebsd-gnu\")
|
$(if $(wildcard /lib/i386-linux-gnu),-DCONFIG_MULTIARCHDIR=\"i386-linux-gnu\"\
|
||||||
NATIVE_DEFINES+=$(if $(wildcard /lib/i386-gnu),-DCONFIG_MULTIARCHDIR=\"i386-gnu\")
|
$(if $(wildcard /lib/i386-kfreebsd-gnu),-DCONFIG_MULTIARCHDIR=\"i386-kfreebsd-gnu\"\
|
||||||
|
$(if $(wildcard /lib/i386-gnu),-DCONFIG_MULTIARCHDIR=\"i386-gnu\")))
|
||||||
CFLAGS+=-m32
|
CFLAGS+=-m32
|
||||||
else ifeq ($(ARCH),x86-64)
|
else ifeq ($(ARCH),x86-64)
|
||||||
NATIVE_DEFINES=-DTCC_TARGET_X86_64
|
NATIVE_DEFINES=-DTCC_TARGET_X86_64
|
||||||
CFLAGS+=-m64
|
CFLAGS+=-m64
|
||||||
NATIVE_DEFINES+=$(if $(wildcard /usr/lib64),-DCONFIG_LDDIR=\"lib64\")
|
NATIVE_DEFINES+=\
|
||||||
NATIVE_DEFINES+=$(if $(wildcard /lib/x86_64-linux-gnu),-DCONFIG_MULTIARCHDIR=\"x86_64-linux-gnu\")
|
$(if $(wildcard /usr/lib64),-DCONFIG_LDDIR=\"lib64\"\
|
||||||
NATIVE_DEFINES+=$(if $(wildcard /lib/x86_64-kfreebsd-gnu),-DCONFIG_MULTIARCHDIR=\"x86_64-kfreebsd-gnu\")
|
$(if $(wildcard /lib/x86_64-linux-gnu),-DCONFIG_MULTIARCHDIR=\"x86_64-linux-gnu\"\
|
||||||
|
$(if $(wildcard /lib/x86_64-kfreebsd-gnu),-DCONFIG_MULTIARCHDIR=\"x86_64-kfreebsd-gnu\")))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),arm)
|
ifeq ($(ARCH),arm)
|
||||||
|
10
tcc.h
10
tcc.h
@ -152,12 +152,12 @@
|
|||||||
# define CONFIG_SYSROOT ""
|
# define CONFIG_SYSROOT ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_MULTIARCHDIR
|
|
||||||
# define CONFIG_LDDIR "lib/" CONFIG_MULTIARCHDIR
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_LDDIR
|
#ifndef CONFIG_LDDIR
|
||||||
# define CONFIG_LDDIR "lib"
|
# ifdef CONFIG_MULTIARCHDIR
|
||||||
|
# define CONFIG_LDDIR "lib/" CONFIG_MULTIARCHDIR
|
||||||
|
# else
|
||||||
|
# define CONFIG_LDDIR "lib"
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* path to find crt1.o, crti.o and crtn.o */
|
/* path to find crt1.o, crti.o and crtn.o */
|
||||||
|
Loading…
Reference in New Issue
Block a user