[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: octave 3.2.2 build with libstdc++_s.a by GCC-4.4.0 (MinGW Official)
From: |
Tatsuro MATSUOKA |
Subject: |
Re: octave 3.2.2 build with libstdc++_s.a by GCC-4.4.0 (MinGW Official) |
Date: |
Sun, 26 Jul 2009 11:30:55 +0900 (JST) |
The first post included mistakes so that please ignore that.
***********
Hello
I have tried to build octave 3.2.2 with libstdc++_s.a by GCC-4.4.0 (MinGW
Official) .
With very tricky way, I have got a successful result.
I hacked Makefile in liboctave and src to add -lstdc++_s flag at the end of
linker flag.
For octave.exe it went well
g++ -shared-libgcc -D_DLL -DPIC -Ic:/Programs/OctaveBuild/include
-Ic:/Programs/WinDevTools/include
-Ic:/Programs/GnuWin32/include -Ic:/progra~1/Pcre/include -I.
-I../../../octave-3.2.2/src -I..
-I../liboctave -I../src -I../libcruft/misc -I../../../octave-3.2.2
-I../../../octave-3.2.2/liboctave
-I../../../octave-3.2.2/src -I../../../octave-3.2.2/libcruft/misc
-DHAVE_CONFIG_H -mieee-fp
-IC:/Programs/WinDevTools/include/freetype2 -IC:/Programs/WinDevTools/include
-Wall -W -Wshadow
-Wold-style-cast -Wformat -O3 -fomit-frame-pointer \
-L.. -Lc:/Programs/OctaveBuild/lib -LC:/Programs/WinDevTools/lib
-Lc:/Programs/GnuWin32/lib
-o
octave.exe \
main.o \
-L../liboctave -L../libcruft -L../src \
-loctinterp -loctave -lcruft -lglob \
-lumfpack -lamd -lcamd -lcolamd \
-lcholmod -lccolamd -lcxsparse -Lc:/Programs/OctaveBuild/lib -lblas.dll
-llapack.dll \
-lfftw3 -lfftw3f -lqrupdate -larpack -lftgl
-LC:/Programs/WinDevTools/lib -lfreetype -lopengl32
-lglu32 \
-lreadline -ltermcap -liberty -Lc:/Programs/OctaveBuild/lib
-lblas.dll -llapack.dll -lhdf5
-lz -lm
-luuid -lgfortran.dll -lgdi32 -lws2_32 -luser32 -lkernel32
-Lc:/Programs/OctaveBuild/lib
-LC:/Programs/WinDevTools/lib -Lc:/Programs/GnuWin32/lib
-Lc:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0
-Lc:/programs/mingw/bin/../lib/gcc
-Lc:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/lib
-Lc:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0/../../.. -lhdf5 -lz -lm -luuid
-lgfortran.dll
-lgfortranbegin -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -luser32
-lkernel32
-ladvapi32 -lshell32 -lstdc++_s
However, for liboctave.dll, liboptinterp.dll and *.oct file, the above did not
goes well,
g++ alway add -lstdc++ and this caused multiple definition error.
So I first build them with without -lstdc++_s and then eleteted *.dll and oct
files.
And
make -i &> make.log
awk '{if($1=="g\+\+") print $0}' make.log > tmp.text
to get
g++ -shared-libgcc -shared -Wl,--export-all-symbols -Wl,--enable-auto-import
-Wl,--enable-runtime-pseudo-reloc -o betainc.oct betainc.o -L../libcruft
-lcruft -L../liboctave
-loctave -L. -loctinterp -lcholmod -lumfpack -lamd -lcamd -lcolamd -lccolamd
-lcxsparse
-Lc:/Programs/OctaveBuild/lib -lblas.dll -llapack.dll -lfftw3 -lfftw3f
-lqrupdate -larpack
-lreadline
-ltermcap -liberty -Lc:/Programs/OctaveBuild/lib -lblas.dll -llapack.dll -lhdf5
-lz -lm -luuid
-lgfortran.dll -lgdi32 -lws2_32 -luser32 -lkernel32
-Lc:/Programs/OctaveBuild/lib
-LC:/Programs/WinDevTools/lib -Lc:/Programs/GnuWin32/lib
-Lc:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0
-Lc:/programs/mingw/bin/../lib/gcc
-Lc:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/lib
-Lc:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0/../../.. -lhdf5 -lz -lm -luuid
-lgfortran.dll
-lgfortranbegin -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -luser32
-lkernel32
-ladvapi32 -lshell32
:
:
I replace all 'g++' by 'gcc' and add -lstdc++_s -lsupc++ at the last of linker
flag by a text editor.
And then I used the modified link commands and built dll files and oct files.
Size of oct flies were reduced by about 300 kbytes.
Finally I have tested make check.
The result
c:\usr\Tatsu\mingwhome\octaves\octave-3.2.2\src\data.cc PASS 506/509 FAIL 3
test_string.m .......................................... PASS 78/79 FAIL 1
Summary:
PASS 5736
FAIL 4
is the same as the following without shared libstdc++
http://www.nabble.com/Re:-Octave-Version-3.2.2-Released-p24652801.html
However my way was too tricky, I think.
Does anyone tried to build octave by GCC-4.4.0-MinGW official with shared
libstdc++ ?
Regards
Tatsuro
--------------------------------------
Power up the Internet with Yahoo! Toolbar.
http://pr.mail.yahoo.co.jp/toolbar/