Page 1 of 1

Disable SSE while using STL?

Posted: Wed Jul 27, 2016 3:48 pm
by nbdd0121
I've currently trying to write a kernel in C++. I've written my own libc and compiled libstdc++ on top of it. I've tested the library and it is working fine on bare metal. However, when I turned on

Code: Select all

-mno-mmx -mno-sse -mno-sse2
then g++ refuses to compile the code giving the message

Code: Select all

include/c++/6.1.0/bits/basic_string.h:5438:46: error: SSE register return with SSE disabled
   stof(const string& __str, size_t* __idx = 0)
Is there a way to use STL while turning off MMX & SSE?

Re: Disable SSE while using STL?

Posted: Thu Jul 28, 2016 3:01 am
by thepowersgang
You need to tell the compiler to use a software floating point ABI ("soft-float") I think it's just `-fsoft-float` but you will probably want to check that in the GCC documentation.