Issue 110200 - solenv: EXTERNAL_LINKFLAGS
Summary: solenv: EXTERNAL_LINKFLAGS
Status: ACCEPTED
Alias: None
Product: Build Tools
Classification: Code
Component: solenv (show other issues)
Version: DEV300m75
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-17 17:43 UTC by Stephan Bergmann
Modified: 2017-05-20 10:47 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
scratchpad patch (38.19 KB, text/plain)
2010-03-17 17:45 UTC, Stephan Bergmann
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Stephan Bergmann 2010-03-17 17:43:53 UTC
The attached external_linkflags.patch (DEV300_m75-based CWS sb121) was a
misguided attempt at fixing issue 106985 by passing a -Wl,-z,noexecstack from
solenv/inc/unxlng.mk to external modules.

Though the attempt was misguided and thus abandoned (see issue 106985 for
details), the conceived mechanism to pass on certain linker flags (that are not
only relevant for building genuine OOo modules, but also for building external
modules) from solenv/inc to external modules is probably worth implementing, anyway:

- Platform-specific solenv/inc/*.mk set new EXTERNAL_LINKFLAGS to those linker
flags that are not only relevant for building genuine OOo modules, but also for
building external modules.  This probably covers unxmacx.mk's EXTRA_LINKFLAGS
and unxsolu4.mk's ARCH_FLAGS.

- makefile.mks of external modules pass EXTERNAL_LINKFLAGS, potentially extended
with module-specific flags, on to their CONFIGURE/BUILD_ACTIONs.  The canonic
way to do this would be
  my_ldflags = $(EXTERNAL_LINKFLAGS)
  ...
  my_ldflags += ...
  ...
  CONFIGURE_FLAGS += LDFLAGS='$(my_ldflags)'
(This depends on the OOo build system itself not using LDFLAGS, not setting it
in set_soenv.in and not using it in any makefiles, except to pass it to
CONFIGURE/BUILD_ACTIONs of external modules.  If this ever changes, the correct
thing would probably be to use LDFLAGS='$(LDFLAGS) $(my_ldflags)' in the last
line above.)

The attached external_linkflags.patch does this, partially.  I stopped when I
noticed that within moz, LDFLAGS (i.e., disabling execstack) was only propagated
to part of the built directories (i.e., some of the resulting libs correctly had
no execstack, while others erroneously still had)---something similar to the
patch to nss/nss.patch would probably be necessary there.  Also, exporting
MACOSX EXTRA_LINKFLAGS as LDFLAGS in solenv/inc/tg_ext.mk would have to be
removed, but it would also have to be checked that all relevant external modules
do receive correct LDFLAGS through their makefile.mks (a way to do this might be
to do "LDFLAGS=BAD_VALUE build --all" and see where it breaks).
Comment 1 Stephan Bergmann 2010-03-17 17:45:02 UTC
Created attachment 68402 [details]
scratchpad patch
Comment 2 Stephan Bergmann 2010-03-17 17:45:59 UTC
.
Comment 3 Marcus 2017-05-20 10:47:51 UTC
Reset assigne to the default "issues@openoffice.apache.org".