diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b4c774a97d..7e042b4aa8 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,17 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-09-21 15:23 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * utils/hbmk2/hbmk2.prg + + Added support for -strip option in -hblib mode. + ! Fixed -strip in -hbdyn mode for darwin and sunos targets which + use individual strip command. + + * harbour-win-spec + * harbour-wce-spec + * Reverted change in 2009-09-21 14:03. + ; See related pending question on dev list. + 2009-09-21 15:07 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/sunos/global.mk ! Fixed to not use -s option for stripping. This doesn't seem to diff --git a/harbour/harbour-wce-spec b/harbour/harbour-wce-spec index 51795f8934..7b49f0cb17 100644 --- a/harbour/harbour-wce-spec +++ b/harbour/harbour-wce-spec @@ -31,6 +31,12 @@ %define hb_host www.harbour-project.org %define readme README.RPM +# Workaround for the problem of /usr/bin/strip not handling PE binaries. +%define hb_ccpath /opt/mingw32ce/bin +%define hb_ccpref arm-wince-mingw32ce- +%define __strip %{hb_ccpath}/%{hb_ccpref}strip +%define __objdump %{hb_ccpath}/%{hb_ccpref}objdump + ###################################################################### ## Preamble. ###################################################################### diff --git a/harbour/harbour-win-spec b/harbour/harbour-win-spec index 684c16560d..e6f72dbaf0 100644 --- a/harbour/harbour-win-spec +++ b/harbour/harbour-win-spec @@ -31,6 +31,12 @@ %define hb_host www.harbour-project.org %define readme README.RPM +# Workaround for the problem of /usr/bin/strip not handling PE binaries. +%define hb_ccpath /opt/xmingw/bin +%define hb_ccpref i386-mingw- +%define __strip %{hb_ccpath}/%{hb_ccpref}strip +%define __objdump %{hb_ccpath}/%{hb_ccpref}objdump + ###################################################################### ## Preamble. ###################################################################### diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index c18fd93643..df0c489794 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -2183,7 +2183,11 @@ FUNCTION hbmk( aArgs, /* @ */ lPause ) IF hbmk[ _HBMK_lSTRIP ] IF hbmk[ _HBMK_cPLAT ] $ "darwin|sunos" cBin_Post := "strip" - cOpt_Post := "{OB}" + IF lCreateDyn .OR. lCreateLib + cOpt_Post := "-S {OB}" + ELSE + cOpt_Post := "{OB}" + ENDIF ELSE AAdd( hbmk[ _HBMK_aOPTL ], "-s" ) AAdd( hbmk[ _HBMK_aOPTD ], "-s" ) @@ -2357,8 +2361,13 @@ FUNCTION hbmk( aArgs, /* @ */ lPause ) l_aLIBHBBASE_2 := iif( hbmk[ _HBMK_lMT ], aLIB_BASE_2_MT, aLIB_BASE_2 ) ENDIF IF hbmk[ _HBMK_lSTRIP ] - AAdd( hbmk[ _HBMK_aOPTL ], "-s" ) - AAdd( hbmk[ _HBMK_aOPTD ], "-s" ) + IF lCreateLib + cBin_Post := "strip" + cOpt_Post := "-S {OB}" + ELSE + AAdd( hbmk[ _HBMK_aOPTL ], "-s" ) + AAdd( hbmk[ _HBMK_aOPTD ], "-s" ) + ENDIF ENDIF IF lStopAfterCComp IF ! lCreateLib .AND. ! lCreateDyn .AND. ( Len( hbmk[ _HBMK_aPRG ] ) + Len( hbmk[ _HBMK_aC ] ) ) == 1 @@ -2437,8 +2446,13 @@ FUNCTION hbmk( aArgs, /* @ */ lPause ) l_aLIBSYS := ArrayJoin( l_aLIBSYS, { "socket" } ) ENDIF IF hbmk[ _HBMK_lSTRIP ] - AAdd( hbmk[ _HBMK_aOPTL ], "-s" ) - AAdd( hbmk[ _HBMK_aOPTD ], "-s" ) + IF lCreateLib + cBin_Post := "strip" + cOpt_Post := "-S {OB}" + ELSE + AAdd( hbmk[ _HBMK_aOPTL ], "-s" ) + AAdd( hbmk[ _HBMK_aOPTD ], "-s" ) + ENDIF ENDIF /* OS/2 needs a space between -o and file name following it */ IF lStopAfterCComp @@ -2504,8 +2518,13 @@ FUNCTION hbmk( aArgs, /* @ */ lPause ) l_aLIBSYS := ArrayJoin( l_aLIBSYS, { "m" } ) ENDIF IF hbmk[ _HBMK_lSTRIP ] - AAdd( hbmk[ _HBMK_aOPTL ], "-s" ) - AAdd( hbmk[ _HBMK_aOPTD ], "-s" ) + IF lCreateLib + cBin_Post := "strip" + cOpt_Post := "-S {OB}" + ELSE + AAdd( hbmk[ _HBMK_aOPTL ], "-s" ) + AAdd( hbmk[ _HBMK_aOPTD ], "-s" ) + ENDIF ENDIF IF lStopAfterCComp IF ! lCreateLib .AND. ! lCreateDyn .AND. ( Len( hbmk[ _HBMK_aPRG ] ) + Len( hbmk[ _HBMK_aC ] ) ) == 1 @@ -3026,9 +3045,13 @@ FUNCTION hbmk( aArgs, /* @ */ lPause ) AAdd( hbmk[ _HBMK_aOPTL ], "-B -static" ) ENDIF IF hbmk[ _HBMK_lSTRIP ] - IF hbmk[ _HBMK_cPLAT ] == "sunos" + IF lCreateLib .OR. hbmk[ _HBMK_cPLAT ] == "sunos" cBin_Post := "strip" - cOpt_Post := "{OB}" + IF lCreateDyn .OR. lCreateLib + cOpt_Post := "-S {OB}" + ELSE + cOpt_Post := "{OB}" + ENDIF ELSE AAdd( hbmk[ _HBMK_aOPTL ], "-s" ) AAdd( hbmk[ _HBMK_aOPTD ], "-s" )