Olivier

Olivier
5 Rep. 0 Answers 1 Questions 0 Followers 0 Following

Stats

  • 0 answers, 0 selected
  • 1 questions, 0 solved
  • Member for 7 years, 9 months, 25 days
  • 14282 profile views
  • Last seen February 28, 2024

Reputation

Total 5
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+1
June 28, 2016 Commented Hello Erika, Thank YOU for your support. I'm sorry for the confusion, english is not my native langage, I was talking about your website : http://gcc-renesas.com The previous cross-compiler was provided to me by a subcontractor. It seems to be from sourcery ---------------------------------------------------------------------- Here is a sample that lead to the issue that I had with the old cross-compiler (similar to the situation I have in my real project) : class Test { public: Test(); int test_function (double var_1, short var_2, short var_3, bool var_4, bool var_5, bool var_6); unsigned short m_member; }; Test::Test() : m_member(1600) { } int Test::test_function (double var_1, short var_2, short var_3, bool var_4, bool var_5, bool var_6) { int result = 0; if (!var_4) { result = 1; } else if( var_6 ) { result = 2; } else if ( var_2 m_member ) { result = 3; } else if( ( var_5 == true ) || (var_3 >= (var_1 + 100.0) ) ) { result = 4; } return result; } int main(int /*argc*/, char */*argv*/[]) { double var_1 = 1105.5; short var_2 = 1600; short var_3 = 900; bool var_4 = true ; bool var_5 = false; bool var_6 = false; Test test; return test.test_function (var_1, var_2, var_3, var_4, var_5, var_6); } With my previous cross-compiler : output with -fPIE option : 0 output with -fPIC option : 4 expected output : 0 ---------------------------------------------------------------------- That why I wanted to update my cross-compiler with the hope that resolve my problem, but it seems that renesas don't provide a linux compiler, and kpit gnutools website (http://www.kpitgnutools.com/) redirect here. I can't execute with your compiler because my device don't seems to be able to read the executable. EDIT : When I try to execute, I get : ./test_pic: line 1: syntax error: unexpected "(" (yes, at execution time) There is no really build logs : (old compiler) sh-linux-gnu-g++ -O2 -fPIC main.cpp -o test_pic_old sh-linux-gnu-g++ -O2 -fPIE main.cpp -o test_pie_old (your compiler) sh-elf-g++ -O2 -fPIC main.cpp -o test_pic sh-elf-g++ -O2 -fPIE main.cpp -o test_pie with main.cpp is the sample code above. ---------------------------------------------------------------------- Here is the configuration of the cross-compilers : The previous one : Using built-in specs. Target: sh-linux-gnu Configured with: /scratch/ams/sh-10q3/lite/src/gcc-4.5-2010.09/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=sh-linux-gnu --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-cpu=sh4a --with-multilib-list= --with-endian=little,big --enable-extra-sgxxlite-multilibs --enable-incomplete-targets --with-gnu-as --with-gnu-ld --with-specs='%{save-temps: -fverbose-asm} -D__CS_SOURCERYGXX_MAJ__=2010 -D__CS_SOURCERYGXX_MIN__=9 -D__CS_SOURCERYGXX_REV__=45 %{O2:%{!fno-remove-local-statics: -fremove-local-statics}} %{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics: -fremove-local-statics}}}' --enable-languages=c,c++ --enable-shared --enable-lto --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2010.09-45' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/sh-linux-gnu/libc --with-build-sysroot=/scratch/ams/sh-10q3/lite/install/sh-linux-gnu/libc --with-gmp=/scratch/ams/sh-10q3/lite/obj/host-libs-2010.09-45-sh-linux-gnu-i686-pc-linux-gnu/usr --with-mpfr=/scratch/ams/sh-10q3/lite/obj/host-libs-2010.09-45-sh-linux-gnu-i686-pc-linux-gnu/usr --with-mpc=/scratch/ams/sh-10q3/lite/obj/host-libs-2010.09-45-sh-linux-gnu-i686-pc-linux-gnu/usr --with-ppl=/scratch/ams/sh-10q3/lite/obj/host-libs-2010.09-45-sh-linux-gnu-i686-pc-linux-gnu/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-cloog=/scratch/ams/sh-10q3/lite/obj/host-libs-2010.09-45-sh-linux-gnu-i686-pc-linux-gnu/usr --with-libelf=/scratch/ams/sh-10q3/lite/obj/host-libs-2010.09-45-sh-linux-gnu-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/ams/sh-10q3/lite/install/sh-linux-gnu/bin --with-build-time-tools=/scratch/ams/sh-10q3/lite/install/sh-linux-gnu/bin Thread model: posix gcc version 4.5.1 (Sourcery G++ Lite 2010.09-45) your compiler : Using built-in specs. Target: sh-elf Configured with: /home/kpit/fsfsrc/elf-v13.01-src/gcc-4.7.2/configure --disable-shared --enable-sjlj-exceptions --enable-languages=c,c++ --target=sh-elf --with-newlib --with-gmp=/home/kpit/pre-requisite/gcc-4.5.x/linux/prefix --with-mpfr=/home/kpit/pre-requisite/gcc-4.5.x/linux/prefix --with-mpc=/home/kpit/pre-requisite/gcc-4.5.x/linux/prefix --prefix=/usr/share/gnush_v13.01_elf-1 --enable-gold --enable-lto --disable-libstdcxx-pch : (reconfigured) /home/kpit/fsfsrc/elf-v13.01-src/gcc-4.7.2/configure --disable-shared --enable-sjlj-exceptions --enable-languages=c,c++ --target=sh-elf --with-newlib --with-gmp=/home/kpit/pre-requisite/gcc-4.5.x/linux/prefix --with-mpfr=/home/kpit/pre-requisite/gcc-4.5.x/linux/prefix --with-mpc=/home/kpit/pre-requisite/gcc-4.5.x/linux/prefix --prefix=/usr/share/gnush_v13.01_elf-1 --enable-gold --enable-lto --disable-libstdcxx-pch Thread model: single gcc version 4.7-GNUSH_v13.01 (GCC) ---------------------------------------------------------------------- I will try SH toolchain v13.01 because I need multiple thread. EDIT : I don't understand, the toolchain that I got isn't already the SH toolchain v13.01 for Linux ? If you need more information about my problem, feel free to ask again. Thank you.
+2
+1
June 22, 2016 registration

Votes

0 votes received 0/100 0up 0down
0 votes casted 0/100 0up 0down

Top Answers

No answer posted yet!

New questions

Support