[evlog-dev] EVLOG 1.6.1 vs. ARM/XSCALE
Mark Bellon <[email protected]> Wed, 05 Jan 2005 15:43:34 -0700
| Newsgroups | gmane.linux.kernel.event-logging |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------050703070500040903030004
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Most of the work I did was against the previous version, 1.5.3, with
checking against 1.6.0 and then submitting patches. Now that 1.6.1 is
available with everything is integrated I'm verifying the ARM/SXSCALE
support. This may take me a bit...
I work in a cross and native environment with i386, ARM/XSCALE, PPC and
X86_64 architectures. Please tell me about your environment -
distribution, 2.4.x/2.6.x, compiler versions and so forth.
There are a few problems in a cross environment.
Insuring that autoconfig is version 2.58 or later is the first trick.
This requires that one first update to 2.57b first; install it and then
build and install 2.58.
I found a bug in the generated ltmain.sh that screwed up my PPC
environment; since it was already in my fixes I didn't try the
ARM/XSCALE environment without it. I attach a patch but this really
isn't an EVLOG issue so YMMV.
I've had some troubles with GCC 3.4.2 with the EVLOG 1.6.1 source. The
new compiler is notoriously fussy. I attach the patch that I have
submitted for evaluation and eventual integration.
More later,
mark
--------------050703070500040903030004
Content-Type: text/plain;
name="ltmain-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="ltmain-patch"
--- ltmain-save 2003-11-17 09:27:37.000000000 -0700
+++ ltmain.sh 2003-11-17 09:33:02.000000000 -0700
@@ -1716,6 +1716,7 @@
break
fi
done
+ found=no
if test "$found" != yes; then
# deplib doesn't seem to be a libtool library
if test "$linkmode,$pass" = "prog,link"; then
--------------050703070500040903030004
Content-Type: text/plain;
name="gcc-3.4-happy-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="gcc-3.4-happy-patch"
diff -Naur evlog-1.6.1-orig/user/include/evlog.h evlog-1.6.1/user/include/evlog.h
--- evlog-1.6.1-orig/user/include/evlog.h 2004-12-28 15:37:31.000000000 -0700
+++ evlog-1.6.1/user/include/evlog.h 2005-01-05 14:47:09.000000000 -0700
@@ -191,8 +191,6 @@
char file[128];
};
-#define _EVLOG_POS { __LINE__, __FUNCTION__, __FILE__ }
-
struct evlog_info {
char format[128+64];
char facility[64];
@@ -201,9 +199,13 @@
#define syslogat(priority, fmt, ...) \
do { \
- static struct evlog_info __attribute__((section(".log"),unused)) ___ \
- = { fmt, __stringify(EVL_FACILITY_NAME), _EVLOG_POS }; \
+ static struct evlog_info __attribute__((section(".log"),unused)) ___; \
char *unbraced_fmt = _evl_unbrace(fmt); \
+ (void) strncpy(___.format, fmt, sizeof(___.format)); \
+ (void) strncpy(___.facility, __stringify(EVL_FACILITY_NAME), sizeof(___.facility)); \
+ ___.pos.line = __LINE__; \
+ (void) strncpy(___.pos.function, __FUNCTION__, sizeof(___.pos.function)); \
+ (void) strncpy(___.pos.file, __FILE__, sizeof(___.pos.file)); \
if (_evl_syslogat(priority, __stringify(EVL_FACILITY_NAME), \
evl_gen_event_type(__FILE__, __FUNCTION__, fmt), \
fmt, unbraced_fmt, ##__VA_ARGS__) != 1) \
diff -Naur evlog-1.6.1-orig/user/lib/template/convert.c evlog-1.6.1/user/lib/template/convert.c
--- evlog-1.6.1-orig/user/lib/template/convert.c 2004-12-15 10:05:46.000000000 -0700
+++ evlog-1.6.1/user/lib/template/convert.c 2005-01-05 14:47:37.000000000 -0700
@@ -244,7 +244,7 @@
memcpy(data, tmp, dest_size);
}
break;
- default:
+ default: /* make gcc happy */ ;
}
}
diff -Naur evlog-1.6.1-orig/user/lib/util/format.c evlog-1.6.1/user/lib/util/format.c
--- evlog-1.6.1-orig/user/lib/util/format.c 2004-04-29 17:27:56.000000000 -0700
+++ evlog-1.6.1/user/lib/util/format.c 2005-01-05 14:56:06.000000000 -0700
@@ -286,7 +286,7 @@
seg->u.fs_attname = nsaName;
seg->u2.fs_attribute = NULL;
break;
- default:
+ default: /* make gcc happy */ ;
}
seg->fs_userfmt = attrFmt;
if (attrFmt
@@ -475,7 +475,7 @@
*/
size += _evlGetMaxDumpLen();
break;
- default:
+ default: /* make gcc happy */ ;
}
p = p->li_next;
} while (p != head);
@@ -667,7 +667,7 @@
case TY_INT: return TY_UINT;
case TY_LONG: return TY_ULONG;
case TY_LONGLONG: return TY_ULONGLONG;
- default:
+ default: /* make gcc happy */ ;
}
return ty;
}
--------------050703070500040903030004--
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt