Skip to contentSkip to conversation

s390:compel: Enable s390 in compel/

PATCH Dmitry Safonov 1 participant 1 message Jun 30, 2017 1 message not in the archive s390

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20170630143749.5cbdfbfe@TP-holzheu

Dmitry Safonov

author Reviewed-by
#1 lore raw

2017-06-30 15:37 GMT+03:00 Michael Holzheu <[email protected]>:

Quoted 48 lines

Am Fri, 30 Jun 2017 15:23:09 +0300
schrieb Dmitry Safonov <[email protected]>:

Quoted 33 lines

2017-06-29 22:24 GMT+03:00 Michael Holzheu <[email protected]>:

Quoted 32 lines

Add s390 parts to common code files.

---
 compel/.gitignore           |  1 +
 compel/Makefile             |  8 ++++++++
 compel/plugins/Makefile     |  7 +++++++
 compel/src/lib/handle-elf.c | 25 +++++++++++++++++++++++++
 compel/src/main.c           |  3 +++
 5 files changed, 44 insertions(+)
compel/.gitignore +1 -0
index 5b68863..e959dc5 100644
@@ -1,6 +1,7 @@
 arch/x86/plugins/std/sys-exec-tbl-64.c
 arch/x86/plugins/std/syscalls-64.S
 arch/arm/plugins/std/syscalls/syscalls.S
+arch/s390/plugins/std/syscalls/syscalls.S
 include/version.h
 plugins/include/uapi/std/asm/syscall-types.h
 plugins/include/uapi/std/syscall-64.h
compel/Makefile +0 -0
index 43d27f5..ebe006d 100644
@@ -34,6 +34,14 @@ CFLAGS                       += -DNO_RELOCS
 HOSTCFLAGS             += -DNO_RELOCS
 endif
 
Quoted 11 lines

compel/Makefile CFLAGS += -DNO_RELOCS · line 43

Quoted 7 lines
compel/Makefile +7 -0
+# We assume that compel code does not change floating point registers.
+# On s390 gcc uses fprs to cache gprs. Therefore disable floating point
+# with -msoft-float.
+ifeq ($(filter s390x,$(ARCH)),)
+CFLAGS += -msoft-float
+HOSTCFLAGS += -msoft-float
+endif

Could it be moved to top Makefile.compel,
so it wouldn't repeat two times?
Or there is a reason not to do it?

Quoted 8 lines

I just did not understand your build process completely.

Looks like it also works with the following patch:
---
[PATCH] Consolidate msoft-float into Makefile.compel

Thanks for both patches

Quoted 62 lines
---
 Makefile.compel         | 8 ++++++++
 compel/Makefile         | 8 --------
 compel/plugins/Makefile | 7 -------
 3 files changed, 8 insertions(+), 15 deletions(-)
Makefile.compel +8 -0
index 1ef7f8c..9b40079 100644
@@ -70,3 +70,11 @@ compel/$(LIBCOMPEL_SO): compel/$(LIBCOMPEL_A)
 compel-install-targets += compel/$(LIBCOMPEL_SO)
 compel-install-targets += compel/compel
 compel-install-targets += $(compel-plugins)
+
+# We assume that compel code does not change floating point registers.
+# On s390 gcc uses fprs to cache gprs. Therefore disable floating point
+# with -msoft-float.
+ifeq ($(ARCH),s390)
+CFLAGS += -msoft-float
+HOSTCFLAGS += -msoft-float
+endif
compel/Makefile +0 -8
index 0bc2324..43d27f5 100644
@@ -34,14 +34,6 @@ CFLAGS                       += -DNO_RELOCS
 HOSTCFLAGS             += -DNO_RELOCS
 endif
 
-# We assume that compel code does not change floating point registers.
-# On s390 gcc uses fprs to cache gprs. Therefore disable floating point
-# with -msoft-float.
-ifeq ($(ARCH),s390)
-CFLAGS += -msoft-float
-HOSTCFLAGS += -msoft-float
-endif
-
 obj-y                  += src/main.o
 obj-y                  += arch/$(ARCH)/src/lib/handle-elf.o
 obj-y                  += src/lib/handle-elf.o
compel/plugins/Makefile +0 -8
index 39251b0..7127425 100644
@@ -7,13 +7,6 @@ PLUGIN_ARCH_DIR                := compel/arch/$(ARCH)/plugins
 #
 # CFLAGS, ASFLAGS, LDFLAGS
 
-# We assume that compel code does not change floating point registers.
-# On s390 gcc uses fprs to cache gprs. Therefore disable floating point
-# with -msoft-float.
-ifeq ($(ARCH), s390)
-CFLAGS += -msoft-float
-endif
-
 #
 # UAPI inclusion, referred as <compel/...>
 ccflags-y              += -I compel/include/uapi
--

1.9.1

Signature · 1 line
             Dmitry