On Mon, 6 Jun 2005, Nick Glencross wrote:

> Not a problem. I'm attaching a patch which I believe fixes all the build
> issues on HP-UX, and shouldn't cause any breakage with any other platforms.
> 
> I've retested on Linux and cygwin (although cygwin has problems with
> dynclasses), and all's well.
> 
> A summary of the changes:
> 
>  * Two extra flags are made available (cc_shared, which was already extracted
> from Perl but not used, and ccdlflags, which probably needs a better name!),
> and added to the makefile etc.

Agreed -- ccdlflags indeed does need a better name.  I'd suggest 
link_dynamic, since it's really the flags to be supplied to the linker 
that allow it to be used with shared and dynamically loaded libraries. 
(Perl5's Configure confuses things by usually using $cc for linking as 
well.)

(Or, perhaps, link_shared -- Darwin distinguishes between shared libraries 
and dynamically loaded libraries.  I'm not sure which is more relevant 
here.)

The patch below goes on top of yours and renames it link_shared.

diff -r -u parrot-orig/config/gen/makefiles/root.in 
parrot-andy/config/gen/makefiles/root.in
--- parrot-orig/config/gen/makefiles/root.in    Mon Jun  6 09:14:16 2005
+++ parrot-andy/config/gen/makefiles/root.in    Mon Jun  6 13:29:04 2005
@@ -87,7 +87,7 @@
 CFLAGS     = ${ccflags} ${cc_debug} ${ccwarn} $(CC_INC) ${cc_hasjit} 
${cg_flag} ${gc_flag}
 C_LIBS     = ${libs}
 CC_SHARED  = ${cc_shared}
-CCDLFLAGS  = ${ccdlflags}
+LINK_DYNAMIC  = ${link_dynamic}
 LINK       = ${link}
 LINKFLAGS  = ${linkflags} ${link_debug} ${ld_debug}
 LD         = ${ld}
@@ -651,7 +651,7 @@
 $(PARROT) : $(IMCC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
                lib/Parrot/OpLib/core.pm $(SRC_DIR)/parrot_config$(O) \
                $(MINIPARROT)
-       $(LINK) ${ld_out}$(PARROT) $(LINKFLAGS) $(CCDLFLAGS) \
+       $(LINK) ${ld_out}$(PARROT) $(LINKFLAGS) $(LINK_DYNAMIC) \
          $(IMCC_DIR)/main$(O) $(ALL_PARROT_LIBS) $(SRC_DIR)/parrot_config$(O)
 #
 # TODO build the real miniparrot
diff -r -u parrot-orig/config/init/data.pl parrot-andy/config/init/data.pl
--- parrot-orig/config/init/data.pl     Mon Jun  6 09:12:51 2005
+++ parrot-andy/config/init/data.pl     Mon Jun  6 11:18:14 2005
@@ -51,10 +51,6 @@
     # with position-independent code suitable for dynamic loading.
     cc_shared => $Config{cccdlflags}, # e.g. -fpic for GNU cc.
 
-    # Compiler flags used to allow dynamic libraries to access the
-    # binary's symbols
-    ccdlflags => $Config{ccdlflags}, # e.g. -Wl,-E on HP-UX
-
     # C++ compiler -- used to compile parts of ICU.  ICU's configure
     # will try to find a suitable compiler, but it prefers GNU c++ over
     # a system c++, which might not be appropriate.  This setting
@@ -71,6 +67,10 @@
     # make a reasonable guess at defaults.
     link          => $Config{cc},
     linkflags     => $Config{ldflags},
+    # Linker Flags to have this binary work with the shared and dynamically 
+    # loadable libraries we're building.  On HP-UX, for example, we need to
+    # allow dynamic libraries to access the binary's symbols
+    link_dynamic  => $Config{ccdlflags}, # e.g. -Wl,-E on HP-UX
 
     # ld: Tool used to build shared libraries and dynamically loadable
     # modules. Often $cc on Unix-ish systems, but apparently sometimes

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to