Dear Sir/Madam,

I just wanted to ask about the build of gcc. I know it is a required step
before applying to GCC for the GSoC 2025. However, I get an error.

Here is the error:

/home/stoplight/GitProjects/GCC-PROJECT/gcc/build/object/./prev-gcc/xg++
-B/home/stoplight/GitProjects/GCC-PROJECT/gcc/build/object/./prev-gcc/
-B/home/stoplight/GitProjects/install_dir/x86_64-pc-linux-gnu/bin/
-nostdinc++
-B/home/stoplight/GitProjects/GCC-PROJECT/gcc/build/object/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-B/home/stoplight/GitProjects/GCC-PROJECT/gcc/build/object/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs
 
-I/home/stoplight/GitProjects/GCC-PROJECT/gcc/build/object/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu
 
-I/home/stoplight/GitProjects/GCC-PROJECT/gcc/build/object/prev-x86_64-pc-linux-gnu/libstdc++-v3/include
 -I/home/stoplight/GitProjects/GCC-PROJECT/gcc/libstdc++-v3/libsupc++
-L/home/stoplight/GitProjects/GCC-PROJECT/gcc/build/object/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-L/home/stoplight/GitProjects/GCC-PROJECT/gcc/build/object/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs
 -fno-PIE -c   -O -fno-checking -gtoggle -DIN_GCC    -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-error=narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute
-Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -Werror  -DHAVE_CONFIG_H
-fno-PIE -I. -I. -I../../../gcc -I../../../gcc/. -I../../../gcc/../include
 -I../../../gcc/../libcpp/include -I../../../gcc/../libcody
 -I../../../gcc/../libdecnumber -I../../../gcc/../libdecnumber/bid
-I../libdecnumber -I../../../gcc/../libbacktrace   -o tree-tailcall.o -MT
tree-tailcall.o -MMD -MP -MF ./.deps/tree-tailcall.TPo
../../../gcc/tree-tailcall.cc
../../../gcc/tree-tailcall.cc: In function ‘void
find_tail_calls(basic_block, tailcall**, bool, bool&, bool)’:
../../../gcc/tree-tailcall.cc:612:27: error: ‘stmt’ may be used
uninitialized [-Werror=maybe-uninitialized]
  612 |   if ((stmt_could_throw_p (cfun, stmt)
      |        ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
../../../gcc/tree-tailcall.cc:480:11: note: ‘stmt’ was declared here
  480 |   gimple *stmt;
      |           ^~~~
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:1210: tree-tailcall.o] Error 1
make[3]: Leaving directory
'/home/stoplight/GitProjects/GCC-PROJECT/gcc/build/object/gcc'
make[2]: *** [Makefile:5116: all-stage2-gcc] Error 2
make[2]: Leaving directory
'/home/stoplight/GitProjects/GCC-PROJECT/gcc/build/object'
make[1]: *** [Makefile:25506: stage2-bubble] Error 2
make[1]: Leaving directory
'/home/stoplight/GitProjects/GCC-PROJECT/gcc/build/object'
make: *** [Makefile:25718: bootstrap] Error 2

ChatGPT doesn't seem to be able to fix it.

I used this command for configure: ../../configure
--prefix=$HOME/GCC-Project/install_dir --enable-languages=c,c++. I did this
in a build/object folder in gcc folder. THe prefix is outside of the gcc
folder. THen I ran make BOOT_CFLAGS='-O' bootstrap. I tried rerunning it
with make CFLAGS="-Wno-error=maybe-uninitialized"
CXXFLAGS="-Wno-error=maybe-uninitialized" BOOT_CFLAGS='-O' bootstrap, but
it didn't work. Please let me know what I should do next. I really want to
work for gcc this summer.

Best Wishes,
Leul Shiferaw

Reply via email to