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
4242 .DS_Store
4343 *.swp
4444 lib/x86_64
45+lib/i386
4546 tcc-doc.info
4647 conftest*
4748 tiny_libmaker
Makefile+2−0
@@ -15,6 +15,7 @@ CFLAGS+=-Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 · 14 unmodified lines
1515 endif
1616 endif
1717
18+ifneq ($(TARGETOS),Darwin)
1819 ifeq ($(ARCH),i386)
1920 CFLAGS+=-mpreferred-stack-boundary=2
2021 ifeq ($(GCC_MAJOR),2)
@@ -23,6 +24,7 @@ else · 2 unmodified lines
2324 CFLAGS+=-march=i386 -falign-functions=0
2425 endif
2526 endif
27+endif
2628
2729 ifdef CONFIG_WIN64
2830 CONFIG_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