History

fix a mingw64 build on Linux with --enable-tcc64-mingw

* define CONFIG_WIN64=yes when ARCH=x86-64 (not CONFIG_WIN32=yes) * CONFIG_WIN64 now use a windows install part (not a Linux one)

seyko committed 10 years ago

Commit 18cbe621 parent 824b1b53 files · +16 −4Browse files

Unified · Split

3 files
  1. Makefile +8 −1
  2. configure +7 −2
  3. lib/Makefile +1 −1
Makefile+8−1
@@ -271,10 +271,17 @@ else · 270 unmodified lines
271271 INSTALLBIN=$(INSTALL)
272272 endif
273273
274+ifdef CONFIG_WIN32
275+CONFIG_WIN=yes
276+endif
277+ifdef CONFIG_WIN64
278+CONFIG_WIN=yes
279+endif
280+
274281 install-strip: install
275282 strip $(foreach PROG,$(PROGS),"$(bindir)"/$(PROG))
276283
277−ifndef CONFIG_WIN32
284+ifndef CONFIG_WIN
278285 install: $(PROGS) $(TCCLIBS) $(TCCDOCS)
279286 mkdir -p "$(bindir)"
280287 $(INSTALLBIN) -m755 $(PROGS) "$(bindir)"
configure+7−2
@@ -520,8 +520,13 @@ if test "$noldl" = "yes" ; then · 519 unmodified lines
520520 echo "CONFIG_NOLDL=yes" >> config.mak
521521 fi
522522 if test "$mingw32" = "yes" ; then
523− echo "CONFIG_WIN32=yes" >> config.mak
524− echo "#define CONFIG_WIN32 1" >> $TMPH
523+ if test "$cpu" = "x86-64"; then
524+ echo "CONFIG_WIN64=yes" >> config.mak
525+ echo "#define CONFIG_WIN64 1" >> $TMPH
526+ else
527+ echo "CONFIG_WIN32=yes" >> config.mak
528+ echo "#define CONFIG_WIN32 1" >> $TMPH
529+ fi
525530 fi
526531 if test "$cygwin" = "yes" ; then
527532 echo "#ifndef _WIN32" >> $TMPH
lib/Makefile+1−1
@@ -68,7 +68,7 @@ else · 67 unmodified lines
6868 ifeq "$(TARGET)" "x86_64-win"
6969 OBJ = $(addprefix $(DIR)/,$(WIN64_O))
7070 TGT = -DTCC_TARGET_X86_64 -DTCC_TARGET_PE
71− XCC = $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/include
71+ XCC ?= $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/include
7272 XAR ?= $(DIR)/tiny_libmaker$(EXESUF)
7373 PICFLAGS =
7474 else

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