Skip to content

Commit 14dba80

Browse files
committed
Properly set architecture flags for both compiler and linker
1 parent 3e7b6ac commit 14dba80

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ $(call ensure_binary,$(PKG_CONFIG))
126126

127127
override CFLAGS += -std=c++11 -Wall -Wextra -pedantic -O2 -g
128128

129-
GCC_4_2_OR_HIGHER := $(shell expr `$(CXX) -dumpversion | sed 's/\.//g'` \>= 420)
130-
ifeq "$(GCC_4_2_OR_HIGHER)" "1"
131-
CFLAGS += -march=native
129+
ifeq ($(ARCH),i386)
130+
override CFLAGS += -m32
131+
override LFLAGS += -m32
132132
endif
133133

134134
DEFINES = -DFUSE_USE_VERSION=26

docker-compose.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ services:
2828
- *src-volume
2929
- linux-gcc-32:/build
3030
environment:
31-
- CFLAGS=-m32
3231
- ARCH=i386
3332

3433
linux-gcc-64:

0 commit comments

Comments
 (0)