This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][i386]Fix PR 57756


On Thu, 2013-10-17 10:23:27 -0700, Sriraman Tallam <tmsriram@google.com> wrote:
[...]
> I would need the help of target maintainers to fix it this way since
> it touches every target and it would take time for me to build and
> test every target.

Then you should have probably waited some time, mark your patch as RFC
until there's consent on what exactly needs to be done for all target
archs.

> Michael, OTOH, I dont see any other targets other than i386 and rs6000
> (grepping for "specific_save" and "specific_restore") using
> function_specific save and restore functions. Would it be easier then
> to just add back that line to "opth-gen.awk"?,the patch is below.
> Since, they are not using function specific opts, they presumably
> should not be validating target options a lot.

Some examples for breakage:

sparc64 (http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=20481)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/vaxbuild/repos/gcc/gcc -I/home/vaxbuild/repos/gcc/gcc/. -I/home/vaxbuild/repos/gcc/gcc/../include -I/home/vaxbuild/repos/gcc/gcc/../libcpp/include  -I/home/vaxbuild/repos/gcc/gcc/../libdecnumber -I/home/vaxbuild/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/vaxbuild/repos/gcc/gcc/../libbacktrace    -o sparc.o -MT sparc.o -MMD -MP -MF ./.deps/sparc.TPo /home/vaxbuild/repos/gcc/gcc/config/sparc/sparc.c
/home/vaxbuild/repos/gcc/gcc/config/sparc/sparc.c: In function âvoid sparc_option_override()â:
/home/vaxbuild/repos/gcc/gcc/config/sparc/sparc.c:1228:50: error: âtarget_flags_explicitâ was not declared in this scope
       dump_target_flags("target_flags_explicit", target_flags_explicit);
                                                  ^
/home/vaxbuild/repos/gcc/gcc/config/sparc/sparc.c:1322:7: error: âtarget_flags_explicitâ was not declared in this scope
   if (target_flags_explicit & MASK_FPU)
       ^
make[1]: *** [sparc.o] Error 1


s390-linux (http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=20482)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. -I/home/jbglaw/repos/gcc/gcc/../include -I/home/jbglaw/repos/gcc/gcc/../libcpp/include  -I/home/jbglaw/repos/gcc/gcc/../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libbacktrace    -o s390.o -MT s390.o -MMD -MP -MF ./.deps/s390.TPo /home/jbglaw/repos/gcc/gcc/config/s390/s390.c
/home/jbglaw/repos/gcc/gcc/config/s390/s390.c: In function âvoid s390_option_override()â:
/home/jbglaw/repos/gcc/gcc/config/s390/s390.c:1612: error: âtarget_flags_explicitâ was not declared in this scope
/home/jbglaw/repos/gcc/gcc/config/s390/s390.c:1644: error: âtarget_flags_explicitâ was not declared in this scope
/home/jbglaw/repos/gcc/gcc/config/s390/s390.c:1649: error: âtarget_flags_explicitâ was not declared in this scope
/home/jbglaw/repos/gcc/gcc/config/s390/s390.c:1654: error: âtarget_flags_explicitâ was not declared in this scope
/home/jbglaw/repos/gcc/gcc/config/s390/s390.c:1667: error: âtarget_flags_explicitâ was not declared in this scope
make[1]: *** [s390.o] Error 1


mips64-linux (http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=20471)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -c  -DIN_GCC_FRONTEND -DIN_GCC_FRONTEND -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -Ic-family -I/home/vaxbuild/repos/gcc/gcc -I/home/vaxbuild/repos/gcc/gcc/c-family -I/home/vaxbuild/repos/gcc/gcc/../include -I/home/vaxbuild/repos/gcc/gcc/../libcpp/include  -I/home/vaxbuild/repos/gcc/gcc/../libdecnumber -I/home/vaxbuild/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/vaxbuild/repos/gcc/gcc/../libbacktrace    -o c-family/c-cppbuiltin.o -MT c-family/c-cppbuiltin.o -MMD -MP -MF c-family/.deps/c-cppbuiltin.TPo /home/vaxbuild/repos/gcc/gcc/c-family/c-cppbuiltin.c
In file included from ./tm.h:31:0,
                 from /home/vaxbuild/repos/gcc/gcc/c-family/c-cppbuiltin.c:23:
/home/vaxbuild/repos/gcc/gcc/c-family/c-cppbuiltin.c: In function âvoid cpp_atomic_builtins(cpp_reader*)â:
/home/vaxbuild/repos/gcc/gcc/config/mips/mips.h:1091:4: error: âtarget_flags_explicitâ was not declared in this scope
   (target_flags_explicit & MASK_LLSC \
    ^
./insn-flags.h:814:39: note: in expansion of macro âGENERATE_LL_SCâ
 #define HAVE_sync_compare_and_swapqi (GENERATE_LL_SC)
                                       ^
/home/vaxbuild/repos/gcc/gcc/c-family/c-cppbuiltin.c:594:7: note: in expansion of macro âHAVE_sync_compare_and_swapqiâ
   if (HAVE_sync_compare_and_swapqi || HAVE_atomic_compare_and_swapqi)
       ^
/home/vaxbuild/repos/gcc/gcc/config/mips/mips.h:1091:4: error: âtarget_flags_explicitâ was not declared in this scope
   (target_flags_explicit & MASK_LLSC \
    ^
./insn-flags.h:815:39: note: in expansion of macro âGENERATE_LL_SCâ
 #define HAVE_sync_compare_and_swaphi (GENERATE_LL_SC)
                                       ^
/home/vaxbuild/repos/gcc/gcc/c-family/c-cppbuiltin.c:606:7: note: in expansion of macro âHAVE_sync_compare_and_swaphiâ
   if (HAVE_sync_compare_and_swaphi || HAVE_atomic_compare_and_swaphi)
       ^
/home/vaxbuild/repos/gcc/gcc/config/mips/mips.h:1091:4: error: âtarget_flags_explicitâ was not declared in this scope
   (target_flags_explicit & MASK_LLSC \
    ^
./insn-flags.h:261:39: note: in expansion of macro âGENERATE_LL_SCâ
 #define HAVE_sync_compare_and_swapsi (GENERATE_LL_SC)
                                       ^
/home/vaxbuild/repos/gcc/gcc/c-family/c-cppbuiltin.c:618:7: note: in expansion of macro âHAVE_sync_compare_and_swapsiâ
   if (HAVE_sync_compare_and_swapsi || HAVE_atomic_compare_and_swapsi)
       ^
/home/vaxbuild/repos/gcc/gcc/config/mips/mips.h:1091:4: error: âtarget_flags_explicitâ was not declared in this scope
   (target_flags_explicit & MASK_LLSC \
    ^
./insn-flags.h:262:40: note: in expansion of macro âGENERATE_LL_SCâ
 #define HAVE_sync_compare_and_swapdi ((GENERATE_LL_SC) && (TARGET_64BIT))
                                        ^
/home/vaxbuild/repos/gcc/gcc/c-family/c-cppbuiltin.c:630:7: note: in expansion of macro âHAVE_sync_compare_and_swapdiâ
   if (HAVE_sync_compare_and_swapdi || HAVE_atomic_compare_and_swapdi)
       ^
make[1]: *** [c-family/c-cppbuiltin.o] Error 1


spu-elf (http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=20459)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. -I/home/jbglaw/repos/gcc/gcc/../include -I/home/jbglaw/repos/gcc/gcc/../libcpp/include  -I/home/jbglaw/repos/gcc/gcc/../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libbacktrace    -o spu.o -MT spu.o -MMD -MP -MF ./.deps/spu.TPo /home/jbglaw/repos/gcc/gcc/config/spu/spu.c
/home/jbglaw/repos/gcc/gcc/config/spu/spu.c: In function âvoid spu_option_override()â:
/home/jbglaw/repos/gcc/gcc/config/spu/spu.c:271: error: âtarget_flags_explicitâ was not declared in this scope
/home/jbglaw/repos/gcc/gcc/config/spu/spu.c: In function âtree_node* spu_handle_fndecl_attribute(tree_node**, tree_node*, tree_node*, int, bool*)â:
/home/jbglaw/repos/gcc/gcc/config/spu/spu.c:3690: warning: unknown conversion type character âEâ in format
/home/jbglaw/repos/gcc/gcc/config/spu/spu.c:3690: warning: too many arguments for format
/home/jbglaw/repos/gcc/gcc/config/spu/spu.c: In function âtree_node* spu_handle_vector_attribute(tree_node**, tree_node*, tree_node*, int, bool*)â:
/home/jbglaw/repos/gcc/gcc/config/spu/spu.c:3747: warning: unknown conversion type character âEâ in format
/home/jbglaw/repos/gcc/gcc/config/spu/spu.c:3747: warning: too many arguments for format
make[1]: *** [spu.o] Error 1


alpha-linux (http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=20456)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. -I/home/jbglaw/repos/gcc/gcc/../include -I/home/jbglaw/repos/gcc/gcc/../libcpp/include  -I/home/jbglaw/repos/gcc/gcc/../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libbacktrace    -o alpha.o -MT alpha.o -MMD -MP -MF ./.deps/alpha.TPo /home/jbglaw/repos/gcc/gcc/config/alpha/alpha.c
/home/jbglaw/repos/gcc/gcc/config/alpha/alpha.c: In function âvoid alpha_option_override()â:
/home/jbglaw/repos/gcc/gcc/config/alpha/alpha.c:270: error: âtarget_flags_explicitâ was not declared in this scope
/home/jbglaw/repos/gcc/gcc/config/alpha/alpha.c:403: error: âtarget_flags_explicitâ was not declared in this scope
make[1]: *** [alpha.o] Error 1


m68k-linux (http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=20408)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. -I/home/jbglaw/repos/gcc/gcc/../include -I/home/jbglaw/repos/gcc/gcc/../libcpp/include  -I/home/jbglaw/repos/gcc/gcc/../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libbacktrace    -o m68k.o -MT m68k.o -MMD -MP -MF ./.deps/m68k.TPo /home/jbglaw/repos/gcc/gcc/config/m68k/m68k.c
/home/jbglaw/repos/gcc/gcc/config/m68k/m68k.c: In function âvoid m68k_option_override()â:
/home/jbglaw/repos/gcc/gcc/config/m68k/m68k.c:503: error: âtarget_flags_explicitâ was not declared in this scope
/home/jbglaw/repos/gcc/gcc/config/m68k/m68k.c: In function âtree_node* m68k_handle_fndecl_attribute(tree_node**, tree_node*, tree_node*, int, bool*)â:
/home/jbglaw/repos/gcc/gcc/config/m68k/m68k.c:730: warning: unknown conversion type character âEâ in format
/home/jbglaw/repos/gcc/gcc/config/m68k/m68k.c:730: warning: too many arguments for format
make[1]: *** [m68k.o] Error 1


frv-linux (http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=20396)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/vaxbuild/repos/gcc/gcc -I/home/vaxbuild/repos/gcc/gcc/. -I/home/vaxbuild/repos/gcc/gcc/../include -I/home/vaxbuild/repos/gcc/gcc/../libcpp/include  -I/home/vaxbuild/repos/gcc/gcc/../libdecnumber -I/home/vaxbuild/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/vaxbuild/repos/gcc/gcc/../libbacktrace    -o frv.o -MT frv.o -MMD -MP -MF ./.deps/frv.TPo /home/vaxbuild/repos/gcc/gcc/config/frv/frv.c
/home/vaxbuild/repos/gcc/gcc/config/frv/frv.c: In function âvoid frv_option_override()â:
/home/vaxbuild/repos/gcc/gcc/config/frv/frv.c:642:52: error: âtarget_flags_explicitâ was not declared in this scope
   target_flags |= (frv_default_flags_for_cpu () & ~target_flags_explicit);
                                                    ^
/home/vaxbuild/repos/gcc/gcc/config/frv/frv.c: In function âvoid frv_init_cumulative_args(int*, tree, rtx, tree, int)â:
/home/vaxbuild/repos/gcc/gcc/config/frv/frv.c:3097:51: error: invalid conversion from âintâ to âtree_codeâ [-fpermissive]
      get_tree_code_name ((int)TREE_CODE (ret_type)));
                                                   ^
make[1]: *** [frv.o] Error 1



The actual breakage is uncovered by this fragment:

--- a/gcc/opth-gen.awk
+++ b/gcc/opth-gen.awk
@@ -114,7 +114,6 @@ print "};"
 print "extern struct gcc_options global_options;"
 print "extern const struct gcc_options global_options_init;"
 print "extern struct gcc_options global_options_set;"
-print "#define target_flags_explicit global_options_set.x_target_flags"
 print "#endif"
 print "#endif"
 print ""


...which means that all code using target_flags_explicit needs to be
cared for.

> FWIW, I am testing this patch on i386 and powerpc right now.

Please also test it on at least the targets I reported breakages on.
Have a look here:

http://toolchain.lug-owl.de/buildbot/?limit=1500
http://toolchain.lug-owl.de/buildbot/timeline.php?limit=1500

Generally, if you're looking for targets that are at least somewhat
supported, you find a good list to start with at
contrib/config-list.mk .

MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
  Signature of:                           Wenn ich wach bin, trÃume ich.
  the second  :

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]