From ba14a1e74ab9a7d070fae34192ee913110d8cbf8 Mon Sep 17 00:00:00 2001 From: Kunhoon Baik Date: Thu, 9 Sep 2021 09:18:17 +0900 Subject: [PATCH] Fix to apply mthumb option to only arm --- Makefile | 2 +- packaging/nsjail.spec | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 98bf088..cb22a93 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ COMMON_FLAGS += -O2 -c \ CXXFLAGS += $(USER_DEFINES) $(COMMON_FLAGS) $(shell pkg-config --cflags protobuf) \ -std=c++11 -fno-exceptions -Wno-unused -Wno-unused-parameter -LDFLAGS += -pie -Wl,-z,noexecstack -mthumb -lpthread $(shell pkg-config --libs protobuf) +LDFLAGS += -pie -Wl,-z,noexecstack -lpthread $(shell pkg-config --libs protobuf) BIN = nsjail LIBS = kafel/libkafel.a diff --git a/packaging/nsjail.spec b/packaging/nsjail.spec index e9e7c81..11837b8 100644 --- a/packaging/nsjail.spec +++ b/packaging/nsjail.spec @@ -47,6 +47,9 @@ cp %{SOURCE1003} . %build export CFLAGS="$CFLAGS -DTIZEN" export CXXFLAGS="$CXXFLAGS -DTIZEN" +%ifarch %{arm} +export LDFLAGS="$LDFLAGS -mthumb" +%endif make %{?_smp_mflags} pushd test -- 2.34.1