History

Makefile: allow CONFIG_LDDIR=lib64 configuration

grischka committed 13 years ago

Commit 31864551 parent 4c2941d2 files · +14 −12Browse files

Unified · Split

2 files
  1. Makefile +9 −7
  2. tcc.h +5 −5
Makefile+9−7
@@ -43,17 +43,19 @@ endif · 42 unmodified lines
43endif43endif
44 44
45ifeq ($(ARCH),i386)45ifeq ($(ARCH),i386)
46NATIVE_DEFINES=-DTCC_TARGET_I386 46NATIVE_DEFINES=-DTCC_TARGET_I386
47NATIVE_DEFINES+=$(if $(wildcard /lib/i386-linux-gnu),-DCONFIG_MULTIARCHDIR=\"i386-linux-gnu\")47NATIVE_DEFINES+=\
48NATIVE_DEFINES+=$(if $(wildcard /lib/i386-kfreebsd-gnu),-DCONFIG_MULTIARCHDIR=\"i386-kfreebsd-gnu\")48 $(if $(wildcard /lib/i386-linux-gnu),-DCONFIG_MULTIARCHDIR=\"i386-linux-gnu\"\
49NATIVE_DEFINES+=$(if $(wildcard /lib/i386-gnu),-DCONFIG_MULTIARCHDIR=\"i386-gnu\")49 $(if $(wildcard /lib/i386-kfreebsd-gnu),-DCONFIG_MULTIARCHDIR=\"i386-kfreebsd-gnu\"\
50 $(if $(wildcard /lib/i386-gnu),-DCONFIG_MULTIARCHDIR=\"i386-gnu\")))
50CFLAGS+=-m3251CFLAGS+=-m32
51else ifeq ($(ARCH),x86-64)52else ifeq ($(ARCH),x86-64)
52NATIVE_DEFINES=-DTCC_TARGET_X86_6453NATIVE_DEFINES=-DTCC_TARGET_X86_64
53CFLAGS+=-m6454CFLAGS+=-m64
54NATIVE_DEFINES+=$(if $(wildcard /usr/lib64),-DCONFIG_LDDIR=\"lib64\")55NATIVE_DEFINES+=\
55NATIVE_DEFINES+=$(if $(wildcard /lib/x86_64-linux-gnu),-DCONFIG_MULTIARCHDIR=\"x86_64-linux-gnu\")56 $(if $(wildcard /usr/lib64),-DCONFIG_LDDIR=\"lib64\"\
56NATIVE_DEFINES+=$(if $(wildcard /lib/x86_64-kfreebsd-gnu),-DCONFIG_MULTIARCHDIR=\"x86_64-kfreebsd-gnu\")57 $(if $(wildcard /lib/x86_64-linux-gnu),-DCONFIG_MULTIARCHDIR=\"x86_64-linux-gnu\"\
58 $(if $(wildcard /lib/x86_64-kfreebsd-gnu),-DCONFIG_MULTIARCHDIR=\"x86_64-kfreebsd-gnu\")))
57endif59endif
58 60
59ifeq ($(ARCH),arm)61ifeq ($(ARCH),arm)
tcc.h+5−5
@@ -152,12 +152,12 @@ · 151 unmodified lines
152# define CONFIG_SYSROOT ""152# define CONFIG_SYSROOT ""
153#endif153#endif
154 154
155#ifdef CONFIG_MULTIARCHDIR
156# define CONFIG_LDDIR "lib/" CONFIG_MULTIARCHDIR
157#endif
158
159#ifndef CONFIG_LDDIR155#ifndef CONFIG_LDDIR
160# define CONFIG_LDDIR "lib"156# ifdef CONFIG_MULTIARCHDIR
157# define CONFIG_LDDIR "lib/" CONFIG_MULTIARCHDIR
158# else
159# define CONFIG_LDDIR "lib"
160# endif
161#endif161#endif
162 162
163/* path to find crt1.o, crti.o and crtn.o */163/* path to find crt1.o, crti.o and crtn.o */

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