Skip to content

Commit

Permalink
Use -march=x86-64-v2 for Windows stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
kjliew committed Jan 9, 2023
1 parent cf598ea commit 5112b64
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
15 changes: 11 additions & 4 deletions wrappers/3dfx/src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ CC=$(CROSS)gcc
RC=windres
DLLTOOL=dlltool
STRIP=strip
CFLAGS=-I$(QEMU_SRC_DIR)/hw/3dfx -I$(FXLIB) -D__REV__=\"$(GIT)\" -Wall -Werror -msse2 -O3 -flto -fomit-frame-pointer
CFLAGS=-march=x86-64-v2 -mtune=generic -O3
CFLAGS+=-pipe -I$(QEMU_SRC_DIR)/hw/3dfx -I$(FXLIB) -D__REV__=\"$(GIT)\" -Wall -Werror -flto=auto -fomit-frame-pointer
LDFLAGS=-static-libgcc
LDFLAGS+=-Wl,--disable-auto-image-base,--no-seh,--dynamicbase,--nxcompat
SRCDIR=../src
Expand Down Expand Up @@ -35,7 +36,9 @@ $(TARGET2): $(C_OBJS) glidedll.o
@echo " RC $(@:.dll=_res.o)"
@$(RC) -Jrc -Ocoff -DGLIDE2 -o $(@:.dll=_res.o) ../src/version.rc
@$(CC) -shared $(CFLAGS) -o $@ $+ $(LDFLAGS)
@$(GENDEF) - $@ | sed "s/\(@[0-9]*\)@.*/\1/;s/\(^.*@[0-9]*\)/_\1\ =\ \1/" | grep -e ^LIB -e ^EXP -e "\ =\ " > $(@:.dll=.def)
@$(GENDEF) - $@ | sed "s/\(@[0-9]*\)@.*/\1/;s/\(^.*@[0-9]*\)/_\1\ =\ \1/" | \
sed "s/\ ;\ Check!!!.*//" | \
grep -e ^LIB -e ^EXP -e "\ =\ " > $(@:.dll=.def)
@echo " LD $@"
@$(CC) -shared $(CFLAGS) -o $@ $(@:dll=def) $(@:.dll=_res.o) $+ $(LDFLAGS)
@$(GENDEF) - $@ | sed "s/\(@[0-9]*\)@.*/\1/;s/^_//" > lib$(@:dll=def)
Expand All @@ -47,7 +50,9 @@ $(TARGET1): $(C_OBJS) gl211dll.o
@echo " RC $(@:.dll=_res.o)"
@$(RC) -Jrc -Ocoff -DGLIDE1 -o $(@:.dll=_res.o) ../src/version.rc
@$(CC) -shared $(CFLAGS) -o $@ $+ $(LDFLAGS)
@$(GENDEF) - $@ | sed "s/\(@[0-9]*\)@.*/\1/;s/\(^.*@[0-9]*\)/_\1\ =\ \1/" | grep -e ^LIB -e ^EXP -e "\ =\ " > $(@:.dll=.def)
@$(GENDEF) - $@ | sed "s/\(@[0-9]*\)@.*/\1/;s/\(^.*@[0-9]*\)/_\1\ =\ \1/" | \
sed "s/\ ;\ Check!!!.*//" | \
grep -e ^LIB -e ^EXP -e "\ =\ " > $(@:.dll=.def)
@echo " LD $@"
@$(CC) -shared $(CFLAGS) -o $@ $(@:dll=def) $(@:.dll=_res.o) $+ $(LDFLAGS)

Expand All @@ -57,7 +62,9 @@ $(TARGET3): $(C_OBJS) gl301dll.o
@echo " RC $(@:.dll=_res.o)"
@$(RC) -Jrc -Ocoff -DGLIDE3 -o $(@:.dll=_res.o) ../src/version.rc
@$(CC) -shared $(CFLAGS) -o $@ $+ $(LDFLAGS)
@$(GENDEF) - $@ | sed "s/\(@[0-9]*\)@.*/\1/;s/\(^.*@[0-9]*\)/_\1\ =\ \1/" | grep -e ^LIB -e ^EXP -e "\ =\ " > $(@:.dll=.def)
@$(GENDEF) - $@ | sed "s/\(@[0-9]*\)@.*/\1/;s/\(^.*@[0-9]*\)/_\1\ =\ \1/" | \
sed "s/\ ;\ Check!!!.*//" | \
grep -e ^LIB -e ^EXP -e "\ =\ " > $(@:.dll=.def)
@echo " LD $@"
@$(CC) -shared $(CFLAGS) -o $@ $(@:dll=def) $(@:.dll=_res.o) $+ $(LDFLAGS)
@$(GENDEF) - $@ | sed "s/\(@[0-9]*\)@.*/\1/;s/^_//" > lib$(@:dll=def)
Expand Down
7 changes: 5 additions & 2 deletions wrappers/mesa/src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ CC=$(CROSS)gcc
RC=windres
DLLTOOL=dlltool
STRIP=strip
CFLAGS=-I$(QEMU_SRC_DIR)/hw/mesa -I$(FXLIB) -Wall -Werror -msse2 -O3 -flto -fomit-frame-pointer
CFLAGS=-march=x86-64-v2 -mtune=generic -O3
CFLAGS+=-pipe -I$(QEMU_SRC_DIR)/hw/mesa -I$(FXLIB) -Wall -Werror -flto=auto -fomit-frame-pointer
LDFLAGS=-static-libgcc
LDFLAGS+=-Wl,--disable-auto-image-base,--no-seh,--dynamicbase,--nxcompat
SRCDIR=../src
Expand All @@ -25,7 +26,9 @@ $(TARGET): $(C_OBJS) szdata.o wrapgl32.o stamp.o
@echo " CFLAGS $(CFLAGS)"
@echo " LDFLAGS $(LDFLAGS)"
@$(CC) -shared $(CFLAGS) -o $@ $+ $(LDFLAGS)
@$(GENDEF) - $@ | sed "s/\(@[0-9]*\)@.*/\1/;s/\(^.*\)\(@[0-9]*\)/\1\ =\ \1\2/;/CallWndProc/d;s/^mgl/wgl/;s/wgd//" | grep -e ^LIB -e ^EXP -e "\ =\ " > $(@:.dll=.def)
@$(GENDEF) - $@ | sed "s/\(@[0-9]*\)@.*/\1/;s/\(^.*\)\(@[0-9]*\)/\1\ =\ \1\2/;/CallWndProc/d;s/^mgl/wgl/;s/wgd//" | \
sed "s/\ ;\ Check!!!.*//" | \
grep -e ^LIB -e ^EXP -e "\ =\ " > $(@:.dll=.def)
@echo " LD $@"
@$(CC) -shared $(CFLAGS) -o $@ $(@:dll=def) $+ $(LDFLAGS)

Expand Down

0 comments on commit 5112b64

Please sign in to comment.