* configure: Rebuilt.
* config/tc-frv.h (TARGET_FORMAT): Use elf32-frvfdpic if...
(frv_md_fdpic_enabled): New.
* config/tc-frv.c (frv_md_fdpic_enabled): New.
(DEFAULT_FDPIC): New.
(frv_flags): Use DEFAULT_FDPIC.
(frv_pic_flag): Likewise.
(OPTION_NOPIC): New.
(md_longopts): Add -mnopic.
(md_parse_option): Handle it.
(md_show_usage): Add -mfdpic and -mnopic.
+2004-05-05 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.in: Set em=linux for frv-*-*linux*.
+ * configure: Rebuilt.
+ * config/tc-frv.h (TARGET_FORMAT): Use elf32-frvfdpic if...
+ (frv_md_fdpic_enabled): New.
+ * config/tc-frv.c (frv_md_fdpic_enabled): New.
+ (DEFAULT_FDPIC): New.
+ (frv_flags): Use DEFAULT_FDPIC.
+ (frv_pic_flag): Likewise.
+ (OPTION_NOPIC): New.
+ (md_longopts): Add -mnopic.
+ (md_parse_option): Handle it.
+ (md_show_usage): Add -mfdpic and -mnopic.
+
2004-05-05 Peter Barada <peter@the-baradas.com>
* config/tc-m68k.c: Add find_cf_chip to print list of valid
#endif
#endif
+#ifdef TE_LINUX
+# define DEFAULT_FDPIC EF_FRV_FDPIC
+#else
+# define DEFAULT_FDPIC 0
+#endif
+
static unsigned long frv_mach = bfd_mach_frv;
static bfd_boolean fr400_audio;
/* Flags to set in the elf header */
-static flagword frv_flags = DEFAULT_FLAGS;
+static flagword frv_flags = DEFAULT_FLAGS | DEFAULT_FDPIC;
static int frv_user_set_flags_p = 0;
static int frv_pic_p = 0;
-static const char *frv_pic_flag = (const char *)0;
+static const char *frv_pic_flag = DEFAULT_FDPIC ? "-mfdpic" : (const char *)0;
/* Print tomcat-specific debugging info. */
static int tomcat_debug = 0;
#define OPTION_PACK (OPTION_MD_BASE + 19)
#define OPTION_NO_PACK (OPTION_MD_BASE + 20)
#define OPTION_FDPIC (OPTION_MD_BASE + 21)
+#define OPTION_NOPIC (OPTION_MD_BASE + 22)
struct option md_longopts[] =
{
{ "mpack", no_argument, NULL, OPTION_PACK },
{ "mno-pack", no_argument, NULL, OPTION_NO_PACK },
{ "mfdpic", no_argument, NULL, OPTION_FDPIC },
+ { "mnopic", no_argument, NULL, OPTION_NOPIC },
{ NULL, no_argument, NULL, 0 },
};
frv_pic_flag = "-mfdpic";
break;
+ case OPTION_NOPIC:
+ frv_flags &= ~(EF_FRV_FDPIC | EF_FRV_PIC
+ | EF_FRV_BIGPIC | EF_FRV_LIBPIC);
+ frv_pic_flag = 0;
+ break;
+
case OPTION_TOMCAT_DEBUG:
tomcat_debug = 1;
break;
fprintf (stream, _("-mpic Note small position independent code\n"));
fprintf (stream, _("-mPIC Note large position independent code\n"));
fprintf (stream, _("-mlibrary-pic Compile library for large position indepedent code\n"));
+ fprintf (stream, _("-mfdpic Assemble for the FDPIC ABI\n"));
+ fprintf (stream, _("-mnopic Disable -mpic, -mPIC, -mlibrary-pic and -mfdpic\n"));
fprintf (stream, _("-mcpu={fr500|fr550|fr400|fr405|fr450|fr300|frv|simple|tomcat}\n"));
fprintf (stream, _(" Record the cpu type\n"));
fprintf (stream, _("-mtomcat-stats Print out stats for tomcat workarounds\n"));
frv_vliw_reset (& vliw, frv_mach, frv_flags);
}
+bfd_boolean
+frv_md_fdpic_enabled (void)
+{
+ return (frv_flags & EF_FRV_FDPIC) != 0;
+}
+
int chain_num = 0;
struct vliw_insn_list *frv_insert_vliw_insn PARAMS ((bfd_boolean));
/* The target BFD architecture. */
#define TARGET_ARCH bfd_arch_frv
-#define TARGET_FORMAT "elf32-frv"
+#define TARGET_FORMAT (frv_md_fdpic_enabled () \
+ ? "elf32-frvfdpic" : "elf32-frv")
+extern bfd_boolean frv_md_fdpic_enabled (void);
#define TARGET_BYTES_BIG_ENDIAN 1
;;
darwin* | rhapsody*)
+ # this will be overwritten by pass_all, but leave it in just in case
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
lt_cv_file_magic_cmd='/usr/bin/file -L'
case "$host_os" in
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
;;
esac
+ lt_cv_deplibs_check_method=pass_all
;;
-freebsd* )
+freebsd* | kfreebsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
-netbsd*)
+netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
else
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 3795 "configure"' > conftest.$ac_ext
+ echo '#line 3797 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
rm -rf conftest*
;;
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ case $host in
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS="$CFLAGS"
dlx-*-*) fmt=elf ;;
fr30-*-*) fmt=elf ;;
+ frv-*-*linux*) fmt=elf em=linux;;
frv-*-*) fmt=elf ;;
hppa-*-linux*) case ${cpu} in
yes)
LIBM=
case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
# These system don't have libm
+ # on darwin the libm is a symbolic link to libSystem.dylib
;;
*-ncr-sysv4.3*)
echo "$as_me:$LINENO: checking for _mwvalidcheckl in -lmw" >&5
dlx-*-*) fmt=elf ;;
fr30-*-*) fmt=elf ;;
+ frv-*-*linux*) fmt=elf em=linux;;
frv-*-*) fmt=elf ;;
hppa-*-linux*) case ${cpu} in