This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: GC fixlet for cross compilation


I'm checking this in on the trunk and the 4.1 branch.

Richard Earnshaw pointed out that the recent GC change broke his
ARM cross, as it does not have dlfcn.h.

I'm fixing as appended.  This is a bit ugly, as gc_config.h is
included again later (via gc.h).  But, I didn't want to mess with
include ordering at this point.  Anyway, all we're doing here is
conditionally including dlfcn.h on the same condition under which we
require its contents.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* pthread_support.c: Conditionally include dlfcn.h.

Index: pthread_support.c
===================================================================
--- pthread_support.c	(revision 110683)
+++ pthread_support.c	(working copy)
@@ -47,8 +47,12 @@
 /*#define DEBUG_THREADS 1*/
 /*#define GC_ASSERTIONS*/
 
+#include "gc_config.h"
+
+#ifdef GC_PTHREAD_SYM_VERSION
 #define _GNU_SOURCE
 #include <dlfcn.h>
+#endif
 
 # include "gc.h"
 # include "private/pthread_support.h"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]