daedaleanai / libsupcxx Goto Github PK
View Code? Open in Web Editor NEWA bare metal port of the GNU ISO C++ library
License: Other
A bare metal port of the GNU ISO C++ library
License: Other
Test08 fails, in that it returns a non-zero shell status code (1 on my machine).
The main() function calls std::exit(0), so the status code should be 0. (Just as a note -- the call to std::exit(0) is redundant in the test, since dropping off the end of main is the same as returning 0, which is the same as exit(0)).
dbt run "//libsupcxx/tests/Test08" cc-toolchain=linux-x86_64-libsupcxx
Running libsupcxx/tests/Test08:
Constructing global object
glibcxx datestamp: 20180726
glibcxx release: 8
sizeof(std::size_t): 8
float eval method: 0
ULLONG_MAX: 18446744073709551615
__alignas_is_defined: 1
printArgs(5, 1, 2, 3, 4, 5)
__bool_true_false_are_defined: 1
sizeof(std::uint8_t): 1
At exit function called
Destructing global object
FAILED: libsupcxx/tests/Test08#run
The return code from main using libsupcxx is not the same as calling exit, at least in linux-x86_64-libsupcxx . Specifically, sys::exit(1) (which calls the C function exit(1)) causes a shell exit status of 1, whereas "return 1;" from an initial call to main leads to a shell exit status of 0.
Note, the C standard says:
5.1.2.2.3 Program termination
We serve x86_64-elf-gcc from storage.googleapis.com. That's fine for the binaries (and I guess something like this is necessary to avoid the push limits of github).
But we also have BUILD.go in there, which specifies the toolchain.
I feel like that file should be in version control (ie: github). It's unlikely we want to edit gcc source files, but we do want to occasionally edit the BUILD.go. Right now apart from being a bit of a pain, the process for changing BUILD.go is very unclear.
Could we have a github repo per toolchain with just the BUILD.go file, and a dependency on the binaries on storage.googleapis?
This would also make specifying a version of the toolchain easier as we can depend on git branches and tags like for other versioned things.
Test05 currently fails with a crash.
The comments and print statement suggest that the expected behavior is as it is, but the behavior (as the comments also suggest) is undefined behavior.
There's several problems with this test:
Here's an example running the test:
$ dbt run "//libsupcxx/tests/Test05" cc-toolchain=linux-x86_64-libsupcxx
Running libsupcxx/tests/Test05:
Getting the meaning of life!
Computing the meaning of life!
Answer to the Ultimate Question of Life, the Universe, and Everything: 42
Getting the meaning of life!
Answer to the Ultimate Question of Life, the Universe, and Everything: 42
recursiveInit(0)!
recursiveInit(1)!
FAILED: libsupcxx/tests/Test05#run
A basic version could just return the raw return addresses. It can be expanded by reading the symbol table and printing the function names.
boot/raspi3 and boot/linux-x86_64 use io/string.hh/cc for standard C string functions. This dependency shouldn't exist, as at the moment io is not automatically linked, and it's probably best to keep standard C string functions in libsupcxx, which is always linked.
It's probably not a big deal, but the toolchain registered by x86_64-elf-gcc has the field ArchName set to "i386".
I would expect it should be "x86_64".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.