Skip to content

Commit

Permalink
FreeBSD build structure changes
Browse files Browse the repository at this point in the history
Part of
Code Review:	https://reviews.freebsd.org/D2108

Author:		Don Lewis (truckman at FreeBSD)


git-svn-id: https://svn.apache.org/repos/asf/openoffice/trunk@1669465 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
pgiffuni committed Mar 26, 2015
1 parent cddbce8 commit 908225e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 17 deletions.
27 changes: 19 additions & 8 deletions main/set_soenv.in
Expand Up @@ -359,7 +359,7 @@ elsif ( $platform =~ m/kfreebsd/ )
elsif ( $platform =~ m/freebsd/ )
{ $BIG_SVX = "TRUE";
$COM = "GCC";
$COMPATH = '@COMPATH@';
$COMPATH = '@COMPATH@' . '/bin';
$CVER = "C300";
$GUI = "UNX";
$GUIBASE = "unx";
Expand Down Expand Up @@ -2617,34 +2617,45 @@ sub GetCorrectPath
my @originalPairs = @_;
my @pairs = @originalPairs;
my @Path = split /$ps/, $oldPath;
my @buildPath;
my @sysPath;
my $elem;

for $elem (@Path) {
if ($elem eq '.' || $elem =~ m'^$SOLARENV/' ||
$elem =~ m'/solenv/') {
push @buildPath, $elem;
} else {
push @sysPath, $elem;
}
}

while (@pairs) {
my $path = shift @pairs;
my $cmd = shift @pairs;
my $to_append = 1;
my $elem;

if (! -x "$path/$cmd") {
AddWarning ("Missing executable $path/$cmd\n");
}

for $elem (@Path) {
for $elem (@sysPath) {
if ($elem eq $path) {
# print "Hit duplicate path in path; break\n";
$to_append = 0;
last;
}
if (-f "$elem/$cmd") {
if (-f "$elem/$cmd" && ! -l "$elem/$cmd") {
# print "Element already in path ...\n";
unshift @Path, $path;
unshift @sysPath, $path;
$to_append = 0;
last;
} else {
# print "No file $elem/$cmd\n";
}
}
if ($to_append) {
push @Path, $path;
push @sysPath, $path;
}
}

Expand All @@ -2654,14 +2665,14 @@ sub GetCorrectPath
my $cmd = shift @pairs;
my $realpath;

$realpath = PathLookup ($cmd, @Path);
$realpath = PathLookup ($cmd, @sysPath);
if (!($realpath eq $path)) {
AddWarning ("Path conflict for executables " .
"$path/$cmd against $realpath");
}
}

return join $ps, CleanupPath (@Path);
return join $ps, @buildPath, CleanupPath (@sysPath);
}

#------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion main/solenv/gbuild/platform/freebsd.mk
Expand Up @@ -96,6 +96,7 @@ gb_CXXFLAGS := \
-fvisibility-inlines-hidden \
-fvisibility=hidden \
-pipe \
-DHAVE_STL_INCLUDE_PATH \

ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
gb_CFLAGS_WERROR := -Werror
Expand All @@ -110,7 +111,6 @@ endif
gb_LinkTarget_EXCEPTIONFLAGS := \
-DEXCEPTIONS_ON \
-fexceptions \
-fno-enforce-eh-specs \

gb_LinkTarget_NOEXCEPTIONFLAGS := \
-DEXCEPTIONS_OFF \
Expand All @@ -121,6 +121,7 @@ gb_LinkTarget_LDFLAGS += \
-Wl,-z,combreloc \
-Wl,-z,defs \
$(subst -L../lib , ,$(SOLARLIB)) \
${FBSD_LDFLAGS} \
\

ifeq ($(HAVE_LD_HASH_STYLE),TRUE)
Expand Down
16 changes: 8 additions & 8 deletions main/solenv/inc/unxfbsd.mk
Expand Up @@ -27,7 +27,7 @@ ASM=
AFLAGS=

SOLAR_JAVA*=
PICSWITCH*:=-fpic
PICSWITCH*:=-fPIC
JAVAFLAGSDEBUG=-g

# Include arch specific makefile.
Expand All @@ -49,7 +49,7 @@ JAVAFLAGSDEBUG=-g
#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter"

# _PTHREADS is needed for the stl
CDEFS+=$(PTHREAD_CFLAGS) -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=450
CDEFS+=$(PTHREAD_CFLAGS) -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=450 -DHAVE_STL_INCLUDE_PATH

# enable visibility define in "sal/types.h"
.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
Expand Down Expand Up @@ -88,7 +88,7 @@ CFLAGSENABLESYMBOLS=-g # was temporarily commented out, reenabled before Beta
# flags for the C++ Compiler
CFLAGSCC= -pipe $(ARCH_FLAGS)
# Flags for enabling exception handling
CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
CFLAGSEXCEPTIONS=-fexceptions
# Flags for disabling exception handling
CFLAGS_NO_EXCEPTIONS=-fno-exceptions

Expand Down Expand Up @@ -156,7 +156,7 @@ LINKFLAGSRUNPATH_OXT=
LINKFLAGSRUNPATH_BOXT=-Wl,-z,origin -Wl,-rpath,\''$$ORIGIN'\'
#LINKFLAGSRUNPATH_BOXT=-Wl,-z,origin -Wl,-rpath,\''$$ORIGIN/../../../basis-link/program'\'
LINKFLAGSRUNPATH_NONE=
LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS) $(LINKFLAGS_SYSBASE)
LINKFLAGS=-Wl,-z,combreloc $(LDFLAGS) $(LINKFLAGSDEFS) $(LINKFLAGS_SYSBASE)

# linker flags for linking applications
LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec \
Expand Down Expand Up @@ -199,11 +199,11 @@ STDSHLCUIMT+=-ltcmalloc
.ENDIF

# libraries for linking applications
STDLIBGUIMT+=-Wl,--as-needed $(PTHREAD_LIBS) -lm -Wl,--no-as-needed
STDLIBCUIMT+=-Wl,--as-needed $(PTHREAD_LIBS) -lm -Wl,--no-as-needed
STDLIBGUIMT+=-Wl,--as-needed $(PTHREAD_LIBS) -lm -Wl,--no-as-needed ${FBSD_LDFLAGS}
STDLIBCUIMT+=-Wl,--as-needed $(PTHREAD_LIBS) -lm -Wl,--no-as-needed ${FBSD_LDFLAGS}
# libraries for linking shared libraries
STDSHLGUIMT+=-Wl,--as-needed $(PTHREAD_LIBS) -lm -Wl,--no-as-needed
STDSHLCUIMT+=-Wl,--as-needed $(PTHREAD_LIBS) -lm -Wl,--no-as-needed
STDSHLGUIMT+=-Wl,--as-needed $(PTHREAD_LIBS) -lm -Wl,--no-as-needed ${FBSD_LDFLAGS}
STDSHLCUIMT+=-Wl,--as-needed $(PTHREAD_LIBS) -lm -Wl,--no-as-needed ${FBSD_LDFLAGS}

X11LINK_DYNAMIC = -Wl,--as-needed -lXext -lX11 -Wl,--no-as-needed

Expand Down

0 comments on commit 908225e

Please sign in to comment.