--- Source/Makefile.orig	2006-06-06 14:02:03.000000000 -0700
+++ Source/Makefile	2006-06-06 14:02:43.000000000 -0700
@@ -9,7 +9,7 @@
 SRCS = zlib/deflate.c zlib/trees.c bzip2/blocksort.c bzip2/bzlib.c bzip2/compress.c bzip2/huffman.c 7zip/7zGuids.cpp 7zip/Common/CRC.cpp 7zip/7zip/Compress/LZ/LZInWindow.cpp 7zip/7zip/Compress/LZMA/LZMAEncoder.cpp 7zip/7zip/Common/OutBuffer.cpp 7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp 7zip/Common/Alloc.cpp build.cpp crc32.c DialogTemplate.cpp exedata.cpp lang.cpp makenssi.cpp Plugins.cpp ResourceEditor.cpp ResourceVersionInfo.cpp script.cpp tokens.cpp util.cpp strlist.cpp growbuf.cpp mmap.cpp clzma.cpp lineparse.cpp ShConstants.cpp dirreader.cpp
 OBJS = $(addprefix $(BUILDDIR)/,$(addsuffix .o,$(basename $(SRCS))))
 ifeq "$(strip $(findstring i386pe,$(shell ld -V)))" ""
-LIBS = -lstdc++ -lpthread
+LIBS = -lstdc++ -lpthread -liconv
 EXESUFF =
 else
 LIBS = -lgdi32 -lversion -lstdc++
@@ -30,7 +30,7 @@
 ifneq ($(EXESUFF),)
   LDFLAGS += -Wl,-Map,$(subst $(EXESUFF),.map,$@)
 else
-  LDFLAGS += -Wl,-Map,$@.map
+  LDFLAGS += -Wl
 endif
 
 ifeq ($(PROFILING),1)
@@ -75,7 +75,7 @@
 exedata.o : $(deps)
 
 ../makensis$(EXESUFF) : $(OBJS)
-	$(CC) -Wall $(LDFLAGS) -o ../makensis$(EXESUFF) $(OBJS) $(LIBS)
+	$(CXX) -Wall $(LDFLAGS) -o ../makensis$(EXESUFF) $(OBJS) $(LIBS)
 
 VPATH=zlib:bzip2:7zip:7zip/Common:7zip/7zip:7zip/7zip/Compress/LZ:7zip/7zip/Compress/LZMA:7zip/7zip/Common:7zip/7zip/Compress/RangeCoder
 
