Fix linking and builds with recent versions of gcc;

small clean-up

PR:		160599
Approved by:	Naram Qashat (maintainer)
This commit is contained in:
Brendan Fabeny 2011-09-13 11:32:32 +00:00
parent 43b25cb444
commit a20a49efe5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=281726
2 changed files with 16 additions and 13 deletions

View file

@ -1,6 +1,6 @@
--- makefile.orig 2011-07-31 22:49:29.000000000 -0400 --- makefile.orig 2011-07-31 22:49:29.000000000 -0400
+++ makefile 2011-09-03 16:25:52.000000000 -0400 +++ makefile 2011-09-06 22:02:21.000000000 -0400
@@ -5,13 +5,13 @@ @@ -5,13 +5,6 @@
# GNU make does not like \r\n line endings so should be saved to CVS in binary form. # GNU make does not like \r\n line endings so should be saved to CVS in binary form.
.SUFFIXES: .cxx .o .h .a .c .SUFFIXES: .cxx .o .h .a .c
@ -11,17 +11,10 @@
-CC = g++ -CC = g++
-CCOMP = gcc -CCOMP = gcc
-endif -endif
+#ifdef CLANG
+#CC = clang
+#CCOMP = clang
+#else
+#CC = g++
+#CCOMP = gcc
+#endif
AR = ar AR = ar
ifdef GTK3 ifdef GTK3
@@ -24,7 +24,7 @@ @@ -24,7 +17,7 @@
CONFIGFLAGS:=$(shell pkg-config --cflags $(GTKVERSION)) CONFIGFLAGS:=$(shell pkg-config --cflags $(GTKVERSION))
CONFIGLIB:=$(shell pkg-config --libs $(GTKVERSION) gthread-2.0) CONFIGLIB:=$(shell pkg-config --libs $(GTKVERSION) gthread-2.0)
CONFIGTHREADS:= CONFIGTHREADS:=
@ -30,15 +23,15 @@
ifndef prefix ifndef prefix
ifdef gnomeprefix ifdef gnomeprefix
prefix=$(gnomeprefix) prefix=$(gnomeprefix)
@@ -102,8 +102,9 @@ @@ -102,8 +95,9 @@
$(PROG): SciTEGTK.o GUIGTK.o Widget.o \ $(PROG): SciTEGTK.o GUIGTK.o Widget.o \
FilePath.o SciTEBase.o Credits.o SciTEBuffers.o SciTEIO.o StringList.o Exporters.o StringHelpers.o \ FilePath.o SciTEBase.o Credits.o SciTEBuffers.o SciTEIO.o StringList.o Exporters.o StringHelpers.o \
PropSetFile.o MultiplexExtension.o DirectorExtension.o SciTEProps.o StyleWriter.o Utf8_16.o \ PropSetFile.o MultiplexExtension.o DirectorExtension.o SciTEProps.o StyleWriter.o Utf8_16.o \
- JobQueue.o GTKMutex.o IFaceTable.o $(COMPLIB) $(LUA_OBJS) - JobQueue.o GTKMutex.o IFaceTable.o $(COMPLIB) $(LUA_OBJS)
- $(CC) `$(CONFIGTHREADS)` -rdynamic -Wl,--as-needed -Wl,--version-script lua.vers -DGTK $^ -o $@ $(CONFIGLIB) $(LIBDL) -lstdc++ - $(CC) `$(CONFIGTHREADS)` -rdynamic -Wl,--as-needed -Wl,--version-script lua.vers -DGTK $^ -o $@ $(CONFIGLIB) $(LIBDL) -lstdc++
+ JobQueue.o GTKMutex.o IFaceTable.o $(LUA_OBJS) + JobQueue.o GTKMutex.o IFaceTable.o $(LUA_OBJS)
+ $(CC) $(CONFIGLIB) -lscintilla -lscintilla_lexers -lstdc++ \ + $(CC) -DGTK $(CXXFLAGS) -rdynamic -Wl,--version-script lua.vers $(LDFLAGS) \
+ -rdynamic -Wl,--as-needed -Wl,--version-script lua.vers -DGTK $^ -o $@ + -o $@ $^ -Wl,--as-needed -lscintilla -lscintilla_lexers $(CONFIGLIB)
# Automatically generate header dependencies with "make deps" # Automatically generate header dependencies with "make deps"
include deps.mak include deps.mak

View file

@ -0,0 +1,10 @@
--- ../src/FilePath.h.orig 2011-07-31 22:49:30.000000000 -0400
+++ ../src/FilePath.h 2011-09-06 21:43:03.000000000 -0400
@@ -13,6 +13,7 @@
extern const GUI::gui_char fileWrite[];
#if defined(__unix__)
+#include <cstdio>
#include <limits.h>
#ifdef PATH_MAX
#define MAX_PATH PATH_MAX