Return to BSD News archive
Path: sserve!manuel!munnari.oz.au!mips!mips!sdd.hp.com!uakari.primate.wisc.edu!usenet.coe.montana.edu!news.u.washington.edu!serval!yoda.eecs.wsu.edu!hlu From: hlu@yoda.eecs.wsu.edu (H.J. Lu) Newsgroups: comp.unix.bsd Subject: Re: gcc-2.2.2 patches for BSD/386 Message-ID: <1992Jul12.223225.17128@serval.net.wsu.edu> Date: 12 Jul 92 22:32:25 GMT References: <1992Jul12.194906.18145@gmf.eds.com> Sender: news@serval.net.wsu.edu (USENET News System) Organization: Washington State University Lines: 139 In article <1992Jul12.194906.18145@gmf.eds.com> block@gmf.eds.com (W. Jon Block) writes: >These patches should allow you to cleanly build gcc-2.2.2 on BSDI's >BSD/386, and probably on 386/BSD. >-----------------------------cut here------------------------------ >diff -c gcc/configure:1.1 gcc/configure:1.2 >*** gcc/configure:1.1 Sat Jul 11 15:11:30 1992 >--- gcc/configure Sat Jul 11 15:11:31 1992 >*************** >*** 240,248 **** > tm_file=seq386.h > fi > ;; >! i386-*-bsd*) > xm_file=xm-i386.h > tm_file=i386bsd.h > tmake_file=t-libc-ok > use_collect2=yes > ;; >--- 240,254 ---- > tm_file=seq386.h > fi > ;; >! i386-*-bsd) > xm_file=xm-i386.h > tm_file=i386bsd.h >+ tmake_file=t-libc-ok >+ use_collect2=yes >+ ;; >+ i386-*-bsdi) >+ xm_file=xm-i386.h >+ tm_file=i386bsdi.h > tmake_file=t-libc-ok > use_collect2=yes > ;; Just curious. I thought bsd386/386bsd use the GNU binutils. If it is true, why they have to use `collect2'? [ deleted ] >diff -c gcc/config/i386.md:1.1 gcc/config/i386.md:1.3 >*** gcc/config/i386.md:1.1 Sat Jul 11 15:11:43 1992 >--- gcc/config/i386.md Sat Jul 11 15:11:45 1992 >*************** >*** 3879,3885 **** > label = gen_label_rtx (); > > output_asm_insn (AS2 (xor%B0,%0,%0), operands); >! output_asm_insn (\"repz\;cmps%B2\", operands); > output_asm_insn (\"je %l0\", &label); > > xops[0] = operands[0]; >--- 3879,3885 ---- > label = gen_label_rtx (); > > output_asm_insn (AS2 (xor%B0,%0,%0), operands); >! output_asm_insn (\"repe\;cmps%B2\", operands); > output_asm_insn (\"je %l0\", &label); > > xops[0] = operands[0]; >*************** >*** 3912,3918 **** > xops[1] = CONST0_RTX (QImode); > > output_asm_insn (AS2 (test%B0,%1,%0), xops); >! return \"repz\;cmps%B2\"; > }") > > (define_expand "ffssi2" >--- 3912,3918 ---- > xops[1] = CONST0_RTX (QImode); > > output_asm_insn (AS2 (test%B0,%1,%0), xops); >! return \"repe\;cmps%B2\"; > }") > > (define_expand "ffssi2" >*************** >*** 4073,4079 **** > xops[0] = operands[0]; > xops[1] = constm1_rtx; > output_asm_insn (AS2 (mov%L0,%1,%0), xops); >! return \"repnz\;scas%B2\"; > }") > > ;;- Local variables: >--- 4073,4079 ---- > xops[0] = operands[0]; > xops[1] = constm1_rtx; > output_asm_insn (AS2 (mov%L0,%1,%0), xops); >! return \"repne\;scas%B2\"; > }") > > ;;- Local variables: I think I am right. Only gas does it. Why `collect2'?. Please take a look at config/i386gas.h or something like that. I won't touch i386.md unless absolutely necessary. Have you checked `fildll'? [ deleted ] >diff -c /dev/null gcc/config/i386bsdi.h:1.2 >*** /dev/null Sat Jul 11 15:11:46 1992 >--- gcc/config/i386bsdi.h Sat Jul 11 15:11:47 1992 >*************** >*** 0 **** >--- 1,23 ---- >+ /* Configuration for an i386 running 386BSD as the target machine. */ >+ #include "i386mach.h" >+ >+ #undef CPP_PREDEFINES >+ #define CPP_PREDEFINES "-Dunix -Di386 -Dbsdi -DBSDI" >+ >+ /* Specify extra dir to search for include files. */ >+ #undef SYSTEM_INCLUDE_DIR >+ >+ /* Don't allow / as a comment character */ >+ #undef COMMENT_BEGIN >+ #define COMMENT_BEGIN "#" >+ >+ /* Set APP codes for bsdi gas configuration */ >+ #undef ASM_APP_ON >+ #define ASM_APP_ON "#APP\n" >+ >+ #undef ASM_APP_OFF >+ #define ASM_APP_OFF "#NO_APP\n" >+ >+ /* Don't look for libg.a */ >+ #undef LIB_SPEC >+ #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" I would write my own i386bsd.h. You may want to take a look at i386linux.h if you known where to find it. Linux uses the GNU binutils and gas, just like 386bsd. I think they are very close from the viewpoint of gcc/gas, unless 386bsd did some weird things to gas. H.J. ----- gcc/libc maintainer for Linux