Cross-compiling boost for win32 on linux
Hi, I used to be able to cross-compile boost on linux for win32 with boost.build v1 without problems, but now with v2 I cannot find the mingw toolset. It seems that now we can use gcc toolset but with a mingw flavor. So, where can I set this flavor? Everything I do makes bjam use plain g++ (for building to run on linux), not mingw32-g++ (run on win32). Regards, Rodolfo Lima.
I have a similar problem: building boost for win32 from cygwin (i.e. with -mno-cygwin flag). What I did is to compile bjam for gcc-nocygwin toolset (fine!) and use this bjam to build boost but the flag "-mno-cygwin" is not given to g++. I tried to add "cflags=-mno-cygwin cxxflags=-mno-cygwin linkflags=-mno-cygwin" on the bjam command line but g++ is still invoked without -mno-cygwin. The same happen with toolset gcc and gcc-nocygwin. Here is an extract of the output of bjam -d2: gcc.compile.c++ bin.v2\libs\wave\build\gcc-3.4.4\release\link-static\instantiate_cpp_exprgrammar.o "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -c -o "bin.v2\libs\wave\build\gcc-3.4.4 \release\link-static\instantiate_cpp_exprgrammar.o" "libs\wave\src\instantiate_cpp_exprgrammar.cpp" What is the solution? How can I add the flag "-mno-cygwin" to gcc, g++ and the linker? I have spent so much time to try to find a solution that I thinking of giving up the idea to use the boost library. F. Bron rodolfo@rodsoft.org Envoyé par : Pour : boost-users@lists.boost.org boost-users-bounces@list cc : (ccc : Frederic Bron/Alcan) s.boost.org Objet : [Boost-users] Cross-compiling boost for win32 on linux 28/06/2007 14:34 Veuillez répondre à boost-users Hi, I used to be able to cross-compile boost on linux for win32 with boost.build v1 without problems, but now with v2 I cannot find the mingw toolset. It seems that now we can use gcc toolset but with a mingw flavor. So, where can I set this flavor? Everything I do makes bjam use plain g++ (for building to run on linux), not mingw32-g++ (run on win32). Regards, Rodolfo Lima. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users Avis : Ce message et toute pièce jointe sont la propriété d'Alcan et sont destinés seulement aux personnes ou à l'entité à qui le message est adressé. Si vous avez reçu ce message par erreur, veuillez le détruire et en aviser l'expéditeur par courriel. Si vous n'êtes pas le destinataire du message, vous n'êtes pas autorisé à utiliser, à copier ou à divulguer le contenu du message ou ses pièces jointes en tout ou en partie. Notice: This message and any attachments are the property of Alcan and are intended solely for the named recipients or entity to whom this message is addressed. If you have received this message in error please inform the sender via e-mail and destroy the message. If you are not the intended recipient you are not allowed to use, copy or disclose the contents or attachments in whole or in part.
frederic.bron@alcan.com wrote:
How can I add the flag "-mno-cygwin" to gcc, g++ and the linker? I have spent so much time to try to find a solution that I thinking of giving up the idea to use the boost library.
http://boost.org/boost-build2/doc/html/bbv2/reference/tools.html#bbv2.refere... describes how to specify any options for compiler and linker you like. - Volodya
That's what I do (adding cflags="-mno-cygwin" cxxflags=... on bjam command line) but the flags are not given to g++. I can see it when using -d2 option of bjam.
F. Bron
Vladimir Prus
How can I add the flag "-mno-cygwin" to gcc, g++ and the linker? I have spent so much time to try to find a solution that I thinking of giving up the idea to use the boost library.
http://boost.org/boost-build2/doc/html/bbv2/reference/tools.html#bbv2.refere... describes how to specify any options for compiler and linker you like. - Volodya _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users Avis : Ce message et toute pièce jointe sont la propriété d'Alcan et sont destinés seulement aux personnes ou à l'entité à qui le message est adressé. Si vous avez reçu ce message par erreur, veuillez le détruire et en aviser l'expéditeur par courriel. Si vous n'êtes pas le destinataire du message, vous n'êtes pas autorisé à utiliser, à copier ou à divulguer le contenu du message ou ses pièces jointes en tout ou en partie. Notice: This message and any attachments are the property of Alcan and are intended solely for the named recipients or entity to whom this message is addressed. If you have received this message in error please inform the sender via e-mail and destroy the message. If you are not the intended recipient you are not allowed to use, copy or disclose the contents or attachments in whole or in part.
Change heading of matrix_sparse.htm from "Sparse Matricies" to "Sparse Matrices".
frederic.bron@alcan.com wrote:
That's what I do (adding cflags="-mno-cygwin" cxxflags=... on bjam command line) but the flags are not given to g++. I can see it when using -d2 option of bjam.
That's not what the docs I've pointed at suggest. The docs describe how to specify compiler option when initializing the gcc toolset in user-config.jam. Options specified there will always be applied, for all projects. - Volodya
OK, I have created a user-config.jam file instead of giving the flags on the command line:
using gcc : 3.4.4 : g++ :
<cflags>-mno-cygwin -DNT
<cxxflags>-mno-cygwin -DNT
<compilerflags>-mno-cygwin -DNT
<linkflags>-mno-cygwin -DNT
;
But it seems that bjam does not read the file. How do you ask bjam to read user-config.jam file?
F. Bron
___________________________________
Frédéric Bron (frederic.bron@alcan.com)
Unité ALT, Alcan CRV, BP 27, 38341 Voreppe
téléphone : +33 4 76 57 81 72
télécopie : +33 4 76 57 80 99
Vladimir Prus
That's what I do (adding cflags="-mno-cygwin" cxxflags=... on bjam command line) but the flags are not given to g++. I can see it when using -d2 option of bjam.
That's not what the docs I've pointed at suggest. The docs describe how to specify compiler option when initializing the gcc toolset in user-config.jam. Options specified there will always be applied, for all projects. - Volodya _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users Avis : Ce message et toute pièce jointe sont la propriété d'Alcan et sont destinés seulement aux personnes ou à l'entité à qui le message est adressé. Si vous avez reçu ce message par erreur, veuillez le détruire et en aviser l'expéditeur par courriel. Si vous n'êtes pas le destinataire du message, vous n'êtes pas autorisé à utiliser, à copier ou à divulguer le contenu du message ou ses pièces jointes en tout ou en partie. Notice: This message and any attachments are the property of Alcan and are intended solely for the named recipients or entity to whom this message is addressed. If you have received this message in error please inform the sender via e-mail and destroy the message. If you are not the intended recipient you are not allowed to use, copy or disclose the contents or attachments in whole or in part.
OK !!!! configure erases user-config.jam ! So the file must be altered after running configure. Now it works.
Thanks a lot for your help
F. Bron
Vladimir Prus
That's what I do (adding cflags="-mno-cygwin" cxxflags=... on bjam command line) but the flags are not given to g++. I can see it when using -d2 option of bjam.
That's not what the docs I've pointed at suggest. The docs describe how to specify compiler option when initializing the gcc toolset in user-config.jam. Options specified there will always be applied, for all projects. - Volodya _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users Avis : Ce message et toute pièce jointe sont la propriété d'Alcan et sont destinés seulement aux personnes ou à l'entité à qui le message est adressé. Si vous avez reçu ce message par erreur, veuillez le détruire et en aviser l'expéditeur par courriel. Si vous n'êtes pas le destinataire du message, vous n'êtes pas autorisé à utiliser, à copier ou à divulguer le contenu du message ou ses pièces jointes en tout ou en partie. Notice: This message and any attachments are the property of Alcan and are intended solely for the named recipients or entity to whom this message is addressed. If you have received this message in error please inform the sender via e-mail and destroy the message. If you are not the intended recipient you are not allowed to use, copy or disclose the contents or attachments in whole or in part.
frederic.bron@alcan.com wrote:
OK !!!! configure erases user-config.jam ! So the file must be altered after running configure. Now it works. Thanks a lot for your help
Glad it worked. I would suggest not using configure at all, and directly invoking bjam. The configure script has a bad property of presenting interface that's neither 100% automake/autoconf, nor Boost.Build interface, so it's hard to do anything non-trivial. - Volodya
participants (4)
-
frederic.bron@alcan.com
-
Paul Giaccone
-
rodolfo@rodsoft.org
-
Vladimir Prus