Use color clearing also in Makefile
PATCH 1/9 Use color clearing also in Makefile
--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
@@ -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)
Signature · 1 line
1.7.9.5
PATCH 2/9 Check 'drm.h' existence
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(+)
configure.sh +1 -0
@@ -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
ioctls/drm.c +4 -0
@@ -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 */
Signature · 1 line
1.7.9.5
PATCH 3/9 Fix bitrot in include/syscalls-ia64.h
In reply to Tommi Rantala--- include/syscalls-ia64.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
include/syscalls-ia64.h +7 -7
@@ -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 */
Signature · 1 line
1.7.9.5
PATCH 4/9 Include asm/perfmon.h for the PFM_* constants in syscalls/ia64/perfmonctl.c
In reply to Tommi Rantala--- syscalls/ia64/perfmonctl.c | 2 ++ 1 file changed, 2 insertions(+)
syscalls/ia64/perfmonctl.c +2 -0
@@ -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
Signature · 1 line
1.7.9.5
PATCH 5/9 Fix double .arg3name assignment in syscalls/ia64/perfmonctl.c
In reply to Tommi Rantala--- syscalls/ia64/perfmonctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
syscalls/ia64/perfmonctl.c +1 -1
@@ -36,6 +36,6 @@ struct syscall syscall_perfmonctl = { }, .arg3name = "arg", .arg3type = ARG_ADDRESS, - .arg3name = "count", + .arg4name = "count", };
Signature · 1 line
1.7.9.5
PATCH 6/9 Dummy PTRACE_GETFPREGS and PTRACE_SETFPREGS for IA64
In reply to Tommi Rantala--- include/arch-ia64.h | 3 +++ 1 file changed, 3 insertions(+)
include/arch-ia64.h +3 -0
@@ -10,3 +10,6 @@// for __IA64_UL_CONST we need to include: #include <asm/types.h> + +#define PTRACE_GETFPREGS 0 +#define PTRACE_SETFPREGS 0
Signature · 1 line
1.7.9.5
PATCH 7/9 Check headers with the compiler in configure.sh
In reply to Tommi RantalaTo 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(-)
configure.sh +17 -12
@@ -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"
Signature · 1 line
1.7.9.5
PATCH 8/9 Fix SYSCALLS_ARCH
In reply to Tommi RantalaSuperH 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(-)
Makefile +3 -3
@@ -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
Signature · 1 line
1.7.9.5
PATCH 9/9 Build syscalls/ia64/*.c
In reply to Tommi Rantala--- Makefile | 1 + 1 file changed, 1 insertion(+)
Makefile +1 -0
@@ -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))
Signature · 1 line
1.7.9.5