I just found out, that there is a different behaviour between the C-coreutils echo and the Rust version.
This command leads to an error, while working with the C version:
echo '"\n'CXXFLAGS=-g -O2'\n"'
It leads to this output:
echo '"\n'CXXFLAGS=-g -O2'\n"'
echo: error: Unrecognized option: 'O'
The expected output is:
echo '"\n'CXXFLAGS=-g -O2'\n"'
"\nCXXFLAGS=-g -O2\n"
It seems like the argument is somehow parsed wrong.