Skip to content

Commit

Permalink
fix freeimage build
Browse files Browse the repository at this point in the history
Add the FREEIMAGE_LIB define in order to keep the build process from
defining dllspec specifications. Remove -fPIC to fix a warning.
  • Loading branch information
WSoptics committed Dec 24, 2015
1 parent 196a241 commit 8540e9c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/freeimage-2-fixes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
This file is part of MXE.
See index.html for further information.

Add the FREEIMAGE_LIB define in order to keep the build process from defining
dllspec specifications.

diff -ur a/Makefile.fip b/Makefile.fip
--- a/Makefile.fip 2010-12-09 15:12:12.000000000 +0100
+++ b/Makefile.fip 2015-12-22 13:24:33.071944345 +0100
@@ -17,7 +17,7 @@
MODULES := $(MODULES:.cpp=.o)
CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS
CFLAGS += $(INCLUDE)
-CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
+CXXFLAGS ?= -O3 -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -DFREEIMAGE_LIB
CXXFLAGS += $(INCLUDE)

ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
1 change: 0 additions & 1 deletion src/freeimage.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ define $(PKG)_BUILD

$(MAKE) -C '$(1)' -j '$(JOBS)' -f Makefile.fip \
CXX='$(TARGET)-g++' \
CXXFLAGS='-DFREEIMAGE_LIB' \
CC='$(TARGET)-gcc' \
AR='$(TARGET)-ar' \
RC='$(TARGET)-windres' \
Expand Down

0 comments on commit 8540e9c

Please sign in to comment.