I don't have Harbour running on this platform, but you can
try changing 'LIBS +=' in lines 24 and 28 of config/dyn.mk
to 'SYSLIBS +=' and see if it solves it.

I can make such modification but it will not make hbzlib and hbpcre
code relocatable so even if it resolve the problem in this particular
case (I haven't tested) it will not help on architectures where PIC
is required.
BTW HAIKU support library grouping so you can use it in hbmk2.

This was means to solve the lib order problem only.
So does this work, or is it better to add lib grouping?
I'd prefer the former if it makes it link.

[ this will soon be not needed by default, but it'd be great
to have this right anyway. ]

For me sth like code below is enough but it will be good to
give some control to user to enable or disable such behavior.

BTW why we need:

  ifneq ($(HB_HAS_PCRE),)
     ifneq ($(HB_HAS_PCRE_LOCAL),)
        ...
     endif
  endif

instead of simple:

  ifneq ($(HB_HAS_PCRE_LOCAL),)
     ...
  endif

Thanks, I'll clean this. It's correct, but it
can be made a little more elegant.

Index: harbour/source/Makefile
===================================================================
--- harbour/source/Makefile     (wersja 12515)
+++ harbour/source/Makefile     (kopia robocza)
@@ -104,6 +104,15 @@
         DYNDIRLIST_BASE += source/vm/maindllh
      endif

+      ifneq ($(HB_HAS_PCRE),)
+         ifneq ($(HB_HAS_PCRE_LOCAL),)
+            DYNDIRLIST_BASE += external/pcre
+         endif
+      endif
+      ifneq ($(HB_HAS_ZLIB_LOCAL),)
+         DYNDIRLIST_BASE += external/zlib
+      endif
+
      export DYNDIRLIST_BASE
      export DYNNAME_POST
   endif
Index: harbour/config/lib.mk
===================================================================
--- harbour/config/lib.mk       (wersja 12515)
+++ harbour/config/lib.mk       (kopia robocza)
@@ -38,6 +38,15 @@
   hbvmmt \
   hbmaindllh

+ifneq ($(HB_HAS_PCRE),)
+   ifneq ($(HB_HAS_PCRE_LOCAL),)
+      HB_DYN_LIBS += hbpcre
+   endif
+endif
+ifneq ($(HB_HAS_ZLIB_LOCAL),)
+   HB_DYN_LIBS += hbzlib
+endif
+
# Added only for hbpp
-include $(TOP)$(ROOT)config/$(HB_PLATFORM)/libs.mk
include $(TOP)$(ROOT)config/$(HB_PLATFORM)/$(HB_COMPILER).mk

Looks perfect to me.

The only point I'm out of ideas is to how add option to
disable this behavior. It also needs to be communicated
to hbmk2.

Brgds,
Viktor

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to