Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2007-05-07 19:51:42 +0000
committerAndrew Niefer2007-05-07 19:51:42 +0000
commit2b9d55faffa0220d6f73a18cf36a3b0234833db6 (patch)
treefbb5a8e99ce570c8b7b9ea0a3496c08abb448a41 /bundles/org.eclipse.equinox.executable
parentc61973ae2251b85332f978683364f7de39a490b9 (diff)
downloadrt.equinox.framework-2b9d55faffa0220d6f73a18cf36a3b0234833db6.tar.gz
rt.equinox.framework-2b9d55faffa0220d6f73a18cf36a3b0234833db6.tar.xz
rt.equinox.framework-2b9d55faffa0220d6f73a18cf36a3b0234833db6.zip
bug 185734
Diffstat (limited to 'bundles/org.eclipse.equinox.executable')
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipseNix.c2
-rw-r--r--bundles/org.eclipse.equinox.executable/library/motif/build.sh14
-rw-r--r--bundles/org.eclipse.equinox.executable/library/motif/eclipseMotif.c4
-rw-r--r--bundles/org.eclipse.equinox.executable/library/motif/make_solaris.mak35
4 files changed, 36 insertions, 19 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseNix.c b/bundles/org.eclipse.equinox.executable/library/eclipseNix.c
index d26309897..475fac8f0 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipseNix.c
+++ b/bundles/org.eclipse.equinox.executable/library/eclipseNix.c
@@ -50,7 +50,7 @@ static const char* jvmLocations [] = { "j9vm", "../jre/bin/j9vm",
static void adjustLibraryPath( char * vmLibrary );
static char * findLib(char * command);
#ifdef NETSCAPE_FIX
-static void fixEnvForNetscape();
+extern void fixEnvForNetscape();
#endif /* NETSCAPE_FIX */
char * findVMLibrary( char* command ) {
diff --git a/bundles/org.eclipse.equinox.executable/library/motif/build.sh b/bundles/org.eclipse.equinox.executable/library/motif/build.sh
index 169ae2337..af05a16d4 100644
--- a/bundles/org.eclipse.equinox.executable/library/motif/build.sh
+++ b/bundles/org.eclipse.equinox.executable/library/motif/build.sh
@@ -10,6 +10,7 @@
# IBM Corporation - initial API and implementation
# Kevin Cornell (Rational Software Corporation)
# Sumit Sarkar (Hewlett-Packard)
+# Martin Oberhuber (Wind River) - [185734] Support building with gcc and debug
#*******************************************************************************
#
# Usage: sh build.sh [<optional switches>] [clean]
@@ -21,8 +22,12 @@
# -ws <DEFAULT_WS> - default Eclipse "-ws" value
# -java <JAVA_HOME> - java insgtall for jni headers
#
+# All other arguments are directly passed to the "make" program.
+# This script can also be invoked with the "clean" argument.
#
-# This script can also be invoked with the "clean" argument.
+# Examples:
+# sh build.sh clean
+# sh build.sh -java /usr/j2se OPTFLAG=-g PICFLAG=-fpic
cd `dirname $0`
@@ -59,6 +64,8 @@ case $OS in
OUTPUT_DIR="../../bin/$defaultWS/$defaultOS/$defaultOSArch"
;;
"SunOS")
+ PATH=/usr/ccs/bin:/opt/SUNWspro/bin:$PATH
+ export PATH
makefile="make_solaris.mak"
defaultOS="solaris"
defaultOSArch="sparc"
@@ -133,7 +140,10 @@ if [ "$makefile" != "" ]; then
else
echo "Building $OS launcher. Defaults: -os $DEFAULT_OS -arch $DEFAULT_OS_ARCH -ws $DEFAULT_WS"
make -f $makefile clean
- make -f $makefile all
+ case x$CC in
+ x*gcc*) make -f $makefile all PICFLAG=-fpic ;;
+ *) make -f $makefile all ;;
+ esac
fi
else
echo "Unknown OS ($OS) -- build aborted"
diff --git a/bundles/org.eclipse.equinox.executable/library/motif/eclipseMotif.c b/bundles/org.eclipse.equinox.executable/library/motif/eclipseMotif.c
index 7514338f4..118d02e31 100644
--- a/bundles/org.eclipse.equinox.executable/library/motif/eclipseMotif.c
+++ b/bundles/org.eclipse.equinox.executable/library/motif/eclipseMotif.c
@@ -66,7 +66,7 @@ static Widget shellHandle = 0;
extern void centreShell( Widget widget, Widget expose );
#ifdef NETSCAPE_FIX
-static void fixEnvForNetscape();
+void fixEnvForNetscape();
#endif /* NETSCAPE_FIX */
void takeDownSplashCB( Widget shell, XtPointer app_data, XtPointer widget_data ) {
@@ -221,7 +221,7 @@ void takeDownSplash()
extern char* findCommand( char*);
static const char* XFILESEARCHPATH = "XFILESEARCHPATH";
-static void fixEnvForNetscape()
+void fixEnvForNetscape()
{
char* netscapePath = NULL;
char* netscapeResource = NULL;
diff --git a/bundles/org.eclipse.equinox.executable/library/motif/make_solaris.mak b/bundles/org.eclipse.equinox.executable/library/motif/make_solaris.mak
index dfda68dc8..425744bba 100644
--- a/bundles/org.eclipse.equinox.executable/library/motif/make_solaris.mak
+++ b/bundles/org.eclipse.equinox.executable/library/motif/make_solaris.mak
@@ -8,6 +8,7 @@
# Contributors:
# IBM Corporation - initial API and implementation
# Kevin Cornell (Rational Software Corporation)
+# Martin Oberhuber (Wind River) - [185734] Support building with gcc and debug
#*******************************************************************************
include ../make_version.mak
# Makefile for creating the Solaris/Motif eclipse launcher program.
@@ -22,9 +23,9 @@ include ../make_version.mak
# MOTIF_HOME - the full path to Motif header files
# JAVA_HOME - path to java for JNI headers
-ifeq ($(PROGRAM_OUTPUT),)
+#ifeq ($(PROGRAM_OUTPUT),)
PROGRAM_OUTPUT=eclipse
-endif
+#endif
PROGRAM_LIBRARY=eclipse_$(LIB_VERSION).so
@@ -33,13 +34,19 @@ MAIN_OBJS = eclipseMain.o
COMMON_OBJS = eclipseConfig.o eclipseCommon.o eclipseMotifCommon.o
DLL_OBJS = eclipse.o eclipseMotif.o eclipseUtil.o eclipseJNI.o eclipseShm.o eclipseNix.o\
NgCommon.o NgImage.o NgImageData.o NgWinBMPFileFormat.o
+PICFLAG = -K PIC
+# Optimize and remove all debugging information by default
+OPTFLAG = -O -s
+# OPTFLAG = -g
EXEC = $(PROGRAM_OUTPUT)
DLL = $(PROGRAM_LIBRARY)
-LIBS = -L$(MOTIF_HOME)/lib -L$(X11_HOME)/lib -lXm -lXt -lX11 -lintl -lpthread
-LFLAGS = -shared -Wl,--export-dynamic
-CFLAGS = -O -s \
+LIBS = -L$(MOTIF_HOME)/lib -L$(X11_HOME)/lib -lXm -lXt -lX11 -lintl -lpthread -ldl -lc
+#LFLAGS = -shared -Wl,--export-dynamic
+LFLAGS = -G
+CFLAGS =$(OPTFLAG) \
-DSOLARIS \
+ $(PICFLAG) \
-DNO_XINERAMA_EXTENSIONS \
-DNETSCAPE_FIX \
-DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
@@ -57,28 +64,28 @@ all: $(EXEC) $(DLL)
$(CC) $(CFLAGS) -c $< -o $@
eclipseMain.o: ../eclipseMain.c ../eclipseUnicode.h ../eclipseCommon.h
- $(CC) $(CFLAGS) -c $^ -o $@
+ $(CC) $(CFLAGS) -c ../eclipseMain.c -o $@
eclipse.o: ../eclipse.c ../eclipseOS.h ../eclipseCommon.h ../eclipseJNI.h
- $(CC) $(CFLAGS) -c $^ -o $@
+ $(CC) $(CFLAGS) -c ../eclipse.c -o $@
eclipseCommon.o: ../eclipseCommon.c ../eclipseCommon.h ../eclipseUnicode.h
- $(CC) $(CFLAGS) -c $^ -o $@
+ $(CC) $(CFLAGS) -c ../eclipseCommon.c -o $@
eclipseUtil.o: ../eclipseUtil.c ../eclipseUtil.h ../eclipseOS.h
- $(CC) $(CFLAGS) -c $^ -o $@
+ $(CC) $(CFLAGS) -c ../eclipseUtil.c -o $@
eclipseJNI.o: ../eclipseJNI.c ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.h
- $(CC) $(CFLAGS) -c $^ -o $@
+ $(CC) $(CFLAGS) -c ../eclipseJNI.c -o $@
eclipseConfig.o: ../eclipseConfig.c ../eclipseConfig.h ../eclipseOS.h
- $(CC) $(CFLAGS) -c $^ -o $@
+ $(CC) $(CFLAGS) -c ../eclipseConfig.c -o $@
eclipseShm.o: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c
- $(CC) $(CFLAGS) -c $^ -o $@
+ $(CC) $(CFLAGS) -c ../eclipseShm.c -o $@
eclipseNix.o: ../eclipseNix.c
- $(CC) $(CFLAGS) -c $^ -o $@
+ $(CC) $(CFLAGS) -c ../eclipseNix.c -o $@
$(EXEC): $(MAIN_OBJS) $(COMMON_OBJS)
$(CC) -o $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
@@ -91,4 +98,4 @@ install: all
rm -f $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)
clean:
- rm -f $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS) \ No newline at end of file
+ rm -f $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)

Back to the top