diff options
Diffstat (limited to 'gcc/ada/utils.c')
-rw-r--r-- | gcc/ada/utils.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index 423634ea64d..579fa116397 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -36,6 +36,7 @@ #include "ggc.h" #include "debug.h" #include "convert.h" +#include "target.h" #include "ada.h" #include "types.h" @@ -1566,15 +1567,16 @@ process_attributes (tree decl, struct attrib *attr_list) break; case ATTR_LINK_SECTION: -#ifdef ASM_OUTPUT_SECTION_NAME - DECL_SECTION_NAME (decl) - = build_string (IDENTIFIER_LENGTH (attr_list->name), - IDENTIFIER_POINTER (attr_list->name)); - DECL_COMMON (decl) = 0; -#else - post_error ("?section attributes are not supported for this target", - attr_list->error_point); -#endif + if (targetm.have_named_sections) + { + DECL_SECTION_NAME (decl) + = build_string (IDENTIFIER_LENGTH (attr_list->name), + IDENTIFIER_POINTER (attr_list->name)); + DECL_COMMON (decl) = 0; + } + else + post_error ("?section attributes are not supported for this target", + attr_list->error_point); break; } } |