hughperman / pure-lang

Automatically exported from code.google.com/p/pure-lang
0 stars 0 forks source link

enhancement: accepts env CC & CXX for batch compilation #53

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Uses g++45 (while the command g++ is in version 4.2) to compile pure;
2. Uses pure -c to compile a script:
    pure -c hello.pure -o hello

What is the expected output? What do you see instead?
/usr/local/lib/libpure.so: undefined reference to 
`_ZNKSt5ctypeIcE13_M_widen_initEv@GLIBCXX_3.4.11'
/usr/local/lib/libpure.so: undefined reference to 
`_ZNSt15_List_node_base9_M_unhookEv@GLIBCXX_3.4.14'
/usr/local/lib/libpure.so: undefined reference to 
`_ZNSt15_List_node_base11_M_transferEPS_S0_@GLIBCXX_3.4.14'
/usr/local/lib/libpure.so: undefined reference to 
`_ZNSt15_List_node_base7_M_hookEPS_@GLIBCXX_3.4.14'

What version of the product are you using? On what operating system?
pure-0.46
FreeBSD 8.2-STABLE amd64

Please provide any additional information below.
In interpreter.cc, the commands gcc and g++ are hard coded. But lower version 
g++ does not know how to link libpure.so which was compiled by a higher version 
g++. So if a system comes with different versions of gcc, problem occurs.

My suggestion:
Make `pure' accepts the environment variables CC and CXX. They work similar to 
PURE_CC/PURE_CXX, but for the batch compilation only.
Sample patch for 0.46-rel is included.

Original issue reported on code.google.com by lich...@gmail.com on 19 Mar 2011 at 7:20

Attachments:

GoogleCodeExporter commented 8 years ago
Applied in rev. dd8a6fcd9e9e. Thanks!

Original comment by aggraef@gmail.com on 29 Mar 2011 at 2:51