#
# Assume by default that CONTENTS is C code.
# Otherwise, code should contain:
+# "/* Assembly" for assembly code,
# "// C++" for c++,
# "// D" for D,
# "! Fortran" for Fortran code,
set options ""
}
switch -glob -- $contents {
+ "*/* Assembly*" { set src ${basename}[pid].S }
"*! Fortran*" { set src ${basename}[pid].f90 }
"*// C++*" { set src ${basename}[pid].cc }
"*// D*" { set src ${basename}[pid].d }
return 0;
}
}
+
+proc check_effective_target_property_1_needed { } {
+ return [check_no_compiler_messages property_1_needed executable {
+/* Assembly code */
+#ifdef __LP64__
+# define __PROPERTY_ALIGN 3
+#else
+# define __PROPERTY_ALIGN 2
+#endif
+
+ .section ".note.gnu.property", "a"
+ .p2align __PROPERTY_ALIGN
+ .long 1f - 0f /* name length. */
+ .long 4f - 1f /* data length. */
+ /* NT_GNU_PROPERTY_TYPE_0. */
+ .long 5 /* note type. */
+0:
+ .asciz "GNU" /* vendor name. */
+1:
+ .p2align __PROPERTY_ALIGN
+ /* GNU_PROPERTY_1_NEEDED. */
+ .long 0xb0008000 /* pr_type. */
+ .long 3f - 2f /* pr_datasz. */
+2:
+ /* GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS. */
+ .long 1
+3:
+ .p2align __PROPERTY_ALIGN
+4:
+ .text
+ .globl main
+main:
+ .byte 0
+ } ""]
+}