History

osx: Removed some optimizations for x86 builds as they were causing seg faults.

When using gcc compiler (as opposed to llvm) to build 32 bit tcc, compiler flags -mpreferred-stack-boundary=2, -march=i386 and -falign-functions=2 were being used. -march is redundant as -m32 is already being used. The other two seem to be corrupting stack. I am not sure why this is the case, as the explanation of the flags states that only running code size should be affected, but it does. I think that is is safe to remove these flags altogether for all compilers and platforms, especially since they are not being used for 64 bit builds. However I do not want to apply such wide change without agreement from the people on the mailing list.

Milutin Jovanović committed 14 years ago

Commit 32cd0701 parent a42b0292 files · +3 −0Browse files

Unified · Split

2 files
  1. .gitignore +1 −0
  2. Makefile +2 −0
.gitignore+1−0
@@ -42,6 +42,7 @@ tags · 41 unmodified lines
42.DS_Store42.DS_Store
43*.swp43*.swp
44lib/x86_6444lib/x86_64
45lib/i386
45tcc-doc.info46tcc-doc.info
46conftest*47conftest*
47tiny_libmaker48tiny_libmaker
Makefile+2−0
@@ -15,6 +15,7 @@ CFLAGS+=-Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 · 14 unmodified lines
15endif15endif
16endif16endif
17 17
18ifneq ($(TARGETOS),Darwin)
18ifeq ($(ARCH),i386)19ifeq ($(ARCH),i386)
19CFLAGS+=-mpreferred-stack-boundary=220CFLAGS+=-mpreferred-stack-boundary=2
20ifeq ($(GCC_MAJOR),2)21ifeq ($(GCC_MAJOR),2)
@@ -23,6 +24,7 @@ else · 2 unmodified lines
23CFLAGS+=-march=i386 -falign-functions=024CFLAGS+=-march=i386 -falign-functions=0
24endif25endif
25endif26endif
27endif
26 28
27ifdef CONFIG_WIN6429ifdef CONFIG_WIN64
28CONFIG_WIN32=yes30CONFIG_WIN32=yes

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