cfbraun / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
0 stars 0 forks source link

Set functionality flags at full files #216

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to compile with gcc options -nostdinc -fno-builtin and having disable 
floats on virtual machine configuration

What is the expected output?
Compilation without errors and without any reference to standard system 
libraries.

What do you see instead?
Errors at float.h regarding to math.h not being found, althought is not 
required.

What version of the product are you using? On what operating system?
SVN v0.9 (latest stable) on Ubuntu 11.04, 64 bits

Please provide any additional information below.
A simple solution i have found is to move the #ifdef HAVE_FLOAT line over the 
#include <math.h> one, so if floats are not required the math.h file is not 
being tried to be imported.

Original issue reported on code.google.com by piranna on 2 Oct 2011 at 7:39

GoogleCodeExporter commented 9 years ago
I chose not to test with "-nostdinc" because I want to stick to testing the 
default build.  However, I did try building with "-fno-builtin" and it worked.

Original comment by dwhall...@gmail.com on 28 Nov 2011 at 2:09

GoogleCodeExporter commented 9 years ago
UNRELATED to this issue, I included a change to the docs about moving default 
platform to "desktop64".

Original comment by dwhall...@gmail.com on 28 Nov 2011 at 2:10

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 07b2eb50d9e3.

Original comment by dwhall...@gmail.com on 28 Nov 2011 at 2:13

GoogleCodeExporter commented 9 years ago
It's logic that only with -fno-builtin it works, since math.h is part of stdinc 
and if you don't want it because you provide your custom one it's not a default 
build.

My question was more related to the fact that since floats are an optional 
functionality, the math.h dependence shouldn't be required because is not used 
at any other place, and to do this is only necesary to have the functionality 
required include lines inside the ifdef blocks.

Original comment by piranna on 28 Nov 2011 at 2:21

GoogleCodeExporter commented 9 years ago
I didn't mention it in the comment, but please check the code change revision 
07b2eb50d9e3 to see if this solves your issue.

Original comment by dwhall...@gmail.com on 28 Nov 2011 at 3:23

GoogleCodeExporter commented 9 years ago
This issue was closed by revision c7e89c059cbe.

Original comment by dwhall...@gmail.com on 28 Nov 2011 at 4:26

GoogleCodeExporter commented 9 years ago
Oh, excuse me. Yes, this is just what i was asking for :-)

Original comment by piranna on 28 Nov 2011 at 4:28