743 }
744
745 #if defined(AW_TARGET_i386)
746 if (as64)
747 newae(as, "--64");
748 else
749 newae(as, "--32");
750 #endif
751
752
753 /*
754 * gas for 32-bit arm defaults to a much older version of the arm
755 * architecture than we can really support. Because of that, we instead
756 * opt to make sure that we set the minimum architecture to armv6k, the
757 * minimum of what we actually support.
758 */
759 #if defined(AW_TARGET_arm)
760 if (as64) {
761 return (error("no 64-bit aw target for arm"));
762 } else {
763 newae(as, "-march=armv6k");
764 newae(as, "-mfpu=vfpv2");
765 newae(as, "-mfloat-abi=hard");
766 }
767 #endif
768
769 if (srcfile == NULL)
770 return (usage("no source file(s) specified"));
771 if (outfile == NULL)
772 outfile = "a.out";
773 newae(as, "-o");
774 newae(as, outfile);
775
776 asargv = aeltoargv(as);
777 if (cpp) {
778 #if defined(AW_TARGET_sparc)
779 newae(cpp, "-Dsparc");
780 newae(cpp, "-D__sparc");
781 if (as64)
782 newae(cpp, "-D__sparcv9");
783 else
784 newae(cpp, "-D__sparcv8");
|
743 }
744
745 #if defined(AW_TARGET_i386)
746 if (as64)
747 newae(as, "--64");
748 else
749 newae(as, "--32");
750 #endif
751
752
753 /*
754 * gas for 32-bit arm defaults to a much older version of the arm
755 * architecture than we can really support. Because of that, we instead
756 * opt to make sure that we set the minimum architecture to armv6k, the
757 * minimum of what we actually support.
758 */
759 #if defined(AW_TARGET_arm)
760 if (as64) {
761 return (error("no 64-bit aw target for arm"));
762 } else {
763 newae(as, "-march=armv7-a");
764 newae(as, "-mfpu=vfpv3-d16");
765 newae(as, "-mfloat-abi=hard");
766 }
767 #endif
768
769 if (srcfile == NULL)
770 return (usage("no source file(s) specified"));
771 if (outfile == NULL)
772 outfile = "a.out";
773 newae(as, "-o");
774 newae(as, outfile);
775
776 asargv = aeltoargv(as);
777 if (cpp) {
778 #if defined(AW_TARGET_sparc)
779 newae(cpp, "-Dsparc");
780 newae(cpp, "-D__sparc");
781 if (as64)
782 newae(cpp, "-D__sparcv9");
783 else
784 newae(cpp, "-D__sparcv8");
|