* [PATCH 1/9] Use color clearing also in Makefile
@ 2013-04-01 18:58 Tommi Rantala
2013-04-01 18:58 ` [PATCH 2/9] Check 'drm.h' existence Tommi Rantala
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: Tommi Rantala @ 2013-04-01 18:58 UTC (permalink / raw)
To: davej, trinity; +Cc: Tommi Rantala
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 2155f1f..69c9ab1 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ QUIET_CC = $(Q:@=@echo ' CC '$@;)
all: trinity
test:
- @if [ ! -f config.h ]; then echo "^[[1;31mRun configure.sh first.^[[1;37m" ; exit; fi
+ @if [ ! -f config.h ]; then echo "^[[1;31mRun configure.sh first.^[[0m" ; exit; fi
MACHINE = $(shell $(CC) -dumpmachine)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/9] Check 'drm.h' existence
2013-04-01 18:58 [PATCH 1/9] Use color clearing also in Makefile Tommi Rantala
@ 2013-04-01 18:58 ` Tommi Rantala
2013-04-01 18:58 ` [PATCH 3/9] Fix bitrot in include/syscalls-ia64.h Tommi Rantala
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Tommi Rantala @ 2013-04-01 18:58 UTC (permalink / raw)
To: davej, trinity; +Cc: Tommi Rantala
None of the DRM headers were available when I tried IA64 cross
compilation with some old kernel headers.
---
configure.sh | 1 +
ioctls/drm.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/configure.sh b/configure.sh
index 5e54355..98b740d 100755
--- a/configure.sh
+++ b/configure.sh
@@ -175,6 +175,7 @@ file_exists linux/if_alg.h USE_IF_ALG
file_exists linux/rds.h USE_RDS
file_exists linux/vfio.h USE_VFIO
file_exists linux/btrfs.h USE_BTRFS
+file_exists drm/drm.h USE_DRM
file_exists drm/exynos_drm.h USE_DRM_EXYNOS
file_exists sound/compress_offload.h USE_SNDDRV_COMPRESS_OFFLOAD
file_exists linux/vhost.h USE_VHOST
diff --git a/ioctls/drm.c b/ioctls/drm.c
index afb3147..5740021 100644
--- a/ioctls/drm.c
+++ b/ioctls/drm.c
@@ -1,5 +1,7 @@
#include "config.h"
+#ifdef USE_DRM
+
#include <stdlib.h>
#include <inttypes.h>
@@ -422,3 +424,5 @@ static const struct ioctl_group drm_grp = {
};
REG_IOCTL_GROUP(drm_grp)
+
+#endif /* USE_DRM */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/9] Fix bitrot in include/syscalls-ia64.h
2013-04-01 18:58 [PATCH 1/9] Use color clearing also in Makefile Tommi Rantala
2013-04-01 18:58 ` [PATCH 2/9] Check 'drm.h' existence Tommi Rantala
@ 2013-04-01 18:58 ` Tommi Rantala
2013-04-01 18:58 ` [PATCH 4/9] Include asm/perfmon.h for the PFM_* constants in syscalls/ia64/perfmonctl.c Tommi Rantala
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Tommi Rantala @ 2013-04-01 18:58 UTC (permalink / raw)
To: davej, trinity; +Cc: Tommi Rantala
---
include/syscalls-ia64.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/syscalls-ia64.h b/include/syscalls-ia64.h
index 740e50e..0ff0f75 100644
--- a/include/syscalls-ia64.h
+++ b/include/syscalls-ia64.h
@@ -1,13 +1,11 @@
+#ifndef _SYSCALLS_IA64_H
+#define _SYSCALLS_IA64_H 1
+
/* Syscalls from arch/ia64/kernel/entry.S as of 2.6.31rc2 */
#include "sanitise.h"
-
-#include <fcntl.h>
-#include <signal.h>
-#include <asm/mman.h>
-#include <asm/perfmon.h>
-#include <asm/types.h>
-#include <sys/socket.h>
+#include "syscall.h"
+#include "syscalls/syscalls.h"
struct syscalltable syscalls_ia64[] = {
{ .entry = &syscall_ni_syscall },
@@ -309,3 +307,5 @@ struct syscalltable syscalls_ia64[] = {
{ .entry = &syscall_pwritev },
{ .entry = &syscall_rt_tgsigqueueinfo },
};
+
+#endif /* _SYSCALLS_IA64_H */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/9] Include asm/perfmon.h for the PFM_* constants in syscalls/ia64/perfmonctl.c
2013-04-01 18:58 [PATCH 1/9] Use color clearing also in Makefile Tommi Rantala
2013-04-01 18:58 ` [PATCH 2/9] Check 'drm.h' existence Tommi Rantala
2013-04-01 18:58 ` [PATCH 3/9] Fix bitrot in include/syscalls-ia64.h Tommi Rantala
@ 2013-04-01 18:58 ` Tommi Rantala
2013-04-01 18:58 ` [PATCH 5/9] Fix double .arg3name assignment " Tommi Rantala
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Tommi Rantala @ 2013-04-01 18:58 UTC (permalink / raw)
To: davej, trinity; +Cc: Tommi Rantala
---
syscalls/ia64/perfmonctl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/syscalls/ia64/perfmonctl.c b/syscalls/ia64/perfmonctl.c
index c1f156b..6b50003 100644
--- a/syscalls/ia64/perfmonctl.c
+++ b/syscalls/ia64/perfmonctl.c
@@ -2,6 +2,8 @@
sys_perfmonctl (int fd, int cmd, void __user *arg, int count)
*/
+#include <unistd.h>
+#include <asm/perfmon.h>
#ifndef PFM_CREATE_EVTSETS
#define PFM_CREATE_EVTSETS 0
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/9] Fix double .arg3name assignment in syscalls/ia64/perfmonctl.c
2013-04-01 18:58 [PATCH 1/9] Use color clearing also in Makefile Tommi Rantala
` (2 preceding siblings ...)
2013-04-01 18:58 ` [PATCH 4/9] Include asm/perfmon.h for the PFM_* constants in syscalls/ia64/perfmonctl.c Tommi Rantala
@ 2013-04-01 18:58 ` Tommi Rantala
2013-04-01 18:58 ` [PATCH 6/9] Dummy PTRACE_GETFPREGS and PTRACE_SETFPREGS for IA64 Tommi Rantala
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Tommi Rantala @ 2013-04-01 18:58 UTC (permalink / raw)
To: davej, trinity; +Cc: Tommi Rantala
---
syscalls/ia64/perfmonctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/syscalls/ia64/perfmonctl.c b/syscalls/ia64/perfmonctl.c
index 6b50003..0ee538c 100644
--- a/syscalls/ia64/perfmonctl.c
+++ b/syscalls/ia64/perfmonctl.c
@@ -36,6 +36,6 @@ struct syscall syscall_perfmonctl = {
},
.arg3name = "arg",
.arg3type = ARG_ADDRESS,
- .arg3name = "count",
+ .arg4name = "count",
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 6/9] Dummy PTRACE_GETFPREGS and PTRACE_SETFPREGS for IA64
2013-04-01 18:58 [PATCH 1/9] Use color clearing also in Makefile Tommi Rantala
` (3 preceding siblings ...)
2013-04-01 18:58 ` [PATCH 5/9] Fix double .arg3name assignment " Tommi Rantala
@ 2013-04-01 18:58 ` Tommi Rantala
2013-04-01 18:58 ` [PATCH 7/9] Check headers with the compiler in configure.sh Tommi Rantala
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Tommi Rantala @ 2013-04-01 18:58 UTC (permalink / raw)
To: davej, trinity; +Cc: Tommi Rantala
---
include/arch-ia64.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/arch-ia64.h b/include/arch-ia64.h
index 3068516..f193c56 100644
--- a/include/arch-ia64.h
+++ b/include/arch-ia64.h
@@ -10,3 +10,6 @@
// for __IA64_UL_CONST we need to include:
#include <asm/types.h>
+
+#define PTRACE_GETFPREGS 0
+#define PTRACE_SETFPREGS 0
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 7/9] Check headers with the compiler in configure.sh
2013-04-01 18:58 [PATCH 1/9] Use color clearing also in Makefile Tommi Rantala
` (4 preceding siblings ...)
2013-04-01 18:58 ` [PATCH 6/9] Dummy PTRACE_GETFPREGS and PTRACE_SETFPREGS for IA64 Tommi Rantala
@ 2013-04-01 18:58 ` Tommi Rantala
2013-04-01 18:58 ` [PATCH 8/9] Fix SYSCALLS_ARCH Tommi Rantala
2013-04-01 18:58 ` [PATCH 9/9] Build syscalls/ia64/*.c Tommi Rantala
7 siblings, 0 replies; 9+ messages in thread
From: Tommi Rantala @ 2013-04-01 18:58 UTC (permalink / raw)
To: davej, trinity; +Cc: Tommi Rantala
To allow for proper cross compilation support, pass the headers to the
compiler to see if they are available. Checking the return value from
the pre-processing (-E) seems to do the trick.
---
configure.sh | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/configure.sh b/configure.sh
index 98b740d..f5f6fc9 100755
--- a/configure.sh
+++ b/configure.sh
@@ -12,10 +12,15 @@ echo "/* This file is auto-generated by configure.sh */" > config.h
TMP=$(mktemp)
-file_exists()
+check_header()
{
- echo -n "[*] Checking $1 exists... "
- if [ -f /usr/include/$1 ]; then
+ echo -n "[*] Checking header $1 ... "
+
+ rm -f "$TMP" || exit 1
+ echo "#include <$1>" >"$TMP.c"
+
+ ${CC} "$TMP.c" -E &>"$TMP.log"
+ if [ $? -eq 0 ]; then
echo $GREEN "[YES]" $COL_RESET
echo "#define $2 1" >> config.h
else
@@ -170,15 +175,15 @@ fi
#############################################################################################
-file_exists linux/caif/caif_socket.h USE_CAIF
-file_exists linux/if_alg.h USE_IF_ALG
-file_exists linux/rds.h USE_RDS
-file_exists linux/vfio.h USE_VFIO
-file_exists linux/btrfs.h USE_BTRFS
-file_exists drm/drm.h USE_DRM
-file_exists drm/exynos_drm.h USE_DRM_EXYNOS
-file_exists sound/compress_offload.h USE_SNDDRV_COMPRESS_OFFLOAD
-file_exists linux/vhost.h USE_VHOST
+check_header linux/caif/caif_socket.h USE_CAIF
+check_header linux/if_alg.h USE_IF_ALG
+check_header linux/rds.h USE_RDS
+check_header linux/vfio.h USE_VFIO
+check_header linux/btrfs.h USE_BTRFS
+check_header drm/drm.h USE_DRM
+check_header drm/exynos_drm.h USE_DRM_EXYNOS
+check_header sound/compress_offload.h USE_SNDDRV_COMPRESS_OFFLOAD
+check_header linux/vhost.h USE_VHOST
rm -f "$TMP" "$TMP.log" "$TMP.c"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 8/9] Fix SYSCALLS_ARCH
2013-04-01 18:58 [PATCH 1/9] Use color clearing also in Makefile Tommi Rantala
` (5 preceding siblings ...)
2013-04-01 18:58 ` [PATCH 7/9] Check headers with the compiler in configure.sh Tommi Rantala
@ 2013-04-01 18:58 ` Tommi Rantala
2013-04-01 18:58 ` [PATCH 9/9] Build syscalls/ia64/*.c Tommi Rantala
7 siblings, 0 replies; 9+ messages in thread
From: Tommi Rantala @ 2013-04-01 18:58 UTC (permalink / raw)
To: davej, trinity; +Cc: Tommi Rantala
SuperH compilation was broken, since we are adding SYSCALLS_ARCH to
SRCS, and expect SRCS to only contain *.c files.
---
Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 69c9ab1..1320eb0 100644
--- a/Makefile
+++ b/Makefile
@@ -33,9 +33,9 @@ test:
MACHINE = $(shell $(CC) -dumpmachine)
-SYSCALLS_ARCH = $(patsubst %.c,%.o,$(shell case "$(MACHINE)" in \
+SYSCALLS_ARCH = $(shell case "$(MACHINE)" in \
(sh*) echo syscalls/sh/*.c ;; \
- esac))
+ esac)
HEADERS = $(patsubst %.h,%.h,$(wildcard *.h)) $(patsubst %.h,%.h,$(wildcard syscalls/*.h)) $(patsubst %.h,%.h,$(wildcard ioctls/*.h))
@@ -46,7 +46,7 @@ SRCS = $(wildcard *.c) \
OBJS = $(patsubst %.c,%.o,$(wildcard *.c)) \
$(patsubst %.c,%.o,$(wildcard syscalls/*.c)) \
- $(SYSCALLS_ARCH) \
+ $(patsubst %.c,%.o,$(SYSCALLS_ARCH)) \
$(patsubst %.c,%.o,$(wildcard ioctls/*.c))
DEPDIR= .deps
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 9/9] Build syscalls/ia64/*.c
2013-04-01 18:58 [PATCH 1/9] Use color clearing also in Makefile Tommi Rantala
` (6 preceding siblings ...)
2013-04-01 18:58 ` [PATCH 8/9] Fix SYSCALLS_ARCH Tommi Rantala
@ 2013-04-01 18:58 ` Tommi Rantala
7 siblings, 0 replies; 9+ messages in thread
From: Tommi Rantala @ 2013-04-01 18:58 UTC (permalink / raw)
To: davej, trinity; +Cc: Tommi Rantala
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index 1320eb0..2b57963 100644
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,7 @@ test:
MACHINE = $(shell $(CC) -dumpmachine)
SYSCALLS_ARCH = $(shell case "$(MACHINE)" in \
(sh*) echo syscalls/sh/*.c ;; \
+ (ia64*) echo syscalls/ia64/*.c ;; \
esac)
HEADERS = $(patsubst %.h,%.h,$(wildcard *.h)) $(patsubst %.h,%.h,$(wildcard syscalls/*.h)) $(patsubst %.h,%.h,$(wildcard ioctls/*.h))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-04-01 18:58 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-01 18:58 [PATCH 1/9] Use color clearing also in Makefile Tommi Rantala
2013-04-01 18:58 ` [PATCH 2/9] Check 'drm.h' existence Tommi Rantala
2013-04-01 18:58 ` [PATCH 3/9] Fix bitrot in include/syscalls-ia64.h Tommi Rantala
2013-04-01 18:58 ` [PATCH 4/9] Include asm/perfmon.h for the PFM_* constants in syscalls/ia64/perfmonctl.c Tommi Rantala
2013-04-01 18:58 ` [PATCH 5/9] Fix double .arg3name assignment " Tommi Rantala
2013-04-01 18:58 ` [PATCH 6/9] Dummy PTRACE_GETFPREGS and PTRACE_SETFPREGS for IA64 Tommi Rantala
2013-04-01 18:58 ` [PATCH 7/9] Check headers with the compiler in configure.sh Tommi Rantala
2013-04-01 18:58 ` [PATCH 8/9] Fix SYSCALLS_ARCH Tommi Rantala
2013-04-01 18:58 ` [PATCH 9/9] Build syscalls/ia64/*.c Tommi Rantala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).