From 8a94298b7e146f5e0c46fd1dddbab67a91451b88 Mon Sep 17 00:00:00 2001 From: Vladimir Michl Date: Tue, 26 Jun 2007 22:06:39 +0100 Subject: [PATCH 1/3] Add support for Linux/arm --- io_linux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_linux.h b/io_linux.h index c6f6f30..679aede 100644 --- a/io_linux.h +++ b/io_linux.h @@ -6,7 +6,7 @@ /* Hmm. These constants vary a bit between systems. */ /* (__sh__ includes both sh and sh64) */ -#if defined(__i386__) || defined(__sh__) +#if defined(__i386__) || defined(__sh__) || defined(__arm__) #define CHRONY_IOC_NRBITS 8 #define CHRONY_IOC_TYPEBITS 8 #define CHRONY_IOC_SIZEBITS 14 From 93f6664378b55ed30affeecff72e8651d3cb3b15 Mon Sep 17 00:00:00 2001 From: Vladimir Michl Date: Tue, 26 Jun 2007 22:08:49 +0100 Subject: [PATCH 2/3] Allow RTC support to be excluded at compile time. Add a new option to configure script, allowing to disable (and exclude) RTC module. It saves same memory. --- configure | 11 ++++++++++- rtc.c | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 786e9e1..c100c29 100755 --- a/configure +++ b/configure @@ -133,6 +133,7 @@ For better control, use the options below. --readline-inc-dir=DIR Specify where readline include directory is --readline-lib-dir=DIR Specify where readline lib directory is --with-ncurses-library=DIR Specify where ncurses lib directory is + --disable-rtc Don't include RTC even on Linux Fine tuning of the installation directories: --infodir=DIR info documentation [PREFIX/info] @@ -172,6 +173,7 @@ SYSDEFS="" # Support for readline (on by default) feat_readline=1 +feat_rtc=1 readline_lib="" readline_inc="" ncurses_lib="" @@ -206,6 +208,9 @@ do --mandir=* ) SETMANDIR=`echo $option | sed -e 's/^.*=//;'` ;; + --disable-rtc) + feat_rtc=0 + ;; --help | -h ) usage exit 0 @@ -238,7 +243,11 @@ case $SYSTEM in esac ;; Linux* ) - EXTRA_OBJECTS="sys_linux.o wrap_adjtimex.o rtc_linux.o" + EXTRA_OBJECTS="sys_linux.o wrap_adjtimex.o" + if [ $feat_rtc -eq 1 ] ; then + EXTRA_OBJECTS+=" rtc_linux.o" + EXTRA_DEFS+=" -DFEAT_RTC=1" + fi SYSDEFS="-DLINUX" echo "Configuring for " $SYSTEM if [ "${MACHINE}" = "alpha" ]; then diff --git a/rtc.c b/rtc.c index bde61cb..8ff83cb 100644 --- a/rtc.c +++ b/rtc.c @@ -33,7 +33,7 @@ #include "logging.h" #include "conf.h" -#if defined LINUX +#if defined LINUX && defined FEAT_RTC #include "rtc_linux.h" #endif /* defined LINUX */ @@ -53,7 +53,7 @@ static struct { void (*cycle_logfile)(void); } driver = { -#if defined LINUX +#if defined LINUX && defined FEAT_RTC RTC_Linux_Initialise, RTC_Linux_Finalise, RTC_Linux_TimePreInit, From 38efaf10a840aa3f5a814f32dcafeac2c115eb8c Mon Sep 17 00:00:00 2001 From: "Richard P. Curnow" Date: Tue, 26 Jun 2007 22:11:19 +0100 Subject: [PATCH 3/3] configure: fix indentation from previous patch --- configure | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index c100c29..dd6911c 100755 --- a/configure +++ b/configure @@ -244,10 +244,10 @@ case $SYSTEM in ;; Linux* ) EXTRA_OBJECTS="sys_linux.o wrap_adjtimex.o" - if [ $feat_rtc -eq 1 ] ; then - EXTRA_OBJECTS+=" rtc_linux.o" - EXTRA_DEFS+=" -DFEAT_RTC=1" - fi + if [ $feat_rtc -eq 1 ] ; then + EXTRA_OBJECTS+=" rtc_linux.o" + EXTRA_DEFS+=" -DFEAT_RTC=1" + fi SYSDEFS="-DLINUX" echo "Configuring for " $SYSTEM if [ "${MACHINE}" = "alpha" ]; then