On November 27, 2015 11:16:02 AM CST, Vasudev Kamath <[email protected]> 
wrote:
>Ryan Gonzalez <[email protected]> writes:
>
>> Try going to the top of mathi.h and putting:
>>
>> #undef isnan
>> #undef isinf
>>
>> Stupid macros that don't look like macros.
>
>That worked. Even I didn't realize those as macros. But now I land in
>new error.
>
>/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and
>_SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
># warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use
>_DEFAULT_SOURCE"
>   ^
>In file included from
>/home/vasudev/Documents/C_programming/compilers/9-cc/Linux/386/include/lib9.h:19:0,
>                 from fdlibm/fdlibm.h:2,
>                 from fdlibm/s_isnan.c:20:
>fdlibm/s_isnan.c:22:6: error: expected identifier or ‘(’ before
>‘sizeof’
>  int isnan(double x)
>      ^
>mk: cc -c -m32 ...  : exit status=exit(1)
>mk: for j in ...  : exit status=exit(1)
>
>So I went and put #undef isnan again before #include "fdlibm.h" in
>s_isnan.c and now I stop at a new error, again not mentioned in your
>reported issue.
>
>Posix.c: In function ‘myctime’:
>Posix.c:9:9: warning: implicit declaration of function ‘ctime’
>[-Wimplicit-function-declaration]
>  return ctime(&t);
>         ^
>Posix.c:9:9: warning: return makes pointer from integer without a cast
>[-Wint-conversion]
>cc -m32  -o o.out ar.o Posix.o
>/home/vasudev/Documents/C_programming/compilers/9-cc/Linux/386/lib/libmach.a
>/home/vasudev/Documents/C_programming/compilers/9-cc/Linux/386/lib/libbio.a
>/home/vasudev/Documents/C_programming/compilers/9-cc/Linux/386/lib/lib9.a
>
>ar.o: In function `page':
>/home/vasudev/Documents/C_programming/compilers/9-cc/src/cmd/iar/ar.c:1120:
>warning: the use of `mktemp' is dangerous, better use `mkstemp' or
>`mkdtemp'
>/home/vasudev/Documents/C_programming/compilers/9-cc/Linux/386/lib/libmach.a(obj.o):(.rodata+0x198):
>undefined reference to `_is9'
>/home/vasudev/Documents/C_programming/compilers/9-cc/Linux/386/lib/libmach.a(obj.o):(.rodata+0x19c):
>undefined reference to `_read9'
>collect2: error: ld returned 1 exit status
>mk: cc -m32  ...  : exit status=exit(1)
>mk: for j in ...  : exit status=exit(1)
>mk: for j in ...  : exit status=exit(1)
>
>I guess this is because of commenting out 9obj.c from compilation. So I
>modified 9obj.c, below is the patch
>
>vasudev@rudra:~/Documents/C_programming/compilers/9-cc$ hg diff
>src/libmach/obj.c 
>diff -r 65fb8bb56c59 src/libmach/obj.c
>--- a/src/libmach/obj.c Thu Apr 23 11:11:38 2015 +0100
>+++ b/src/libmach/obj.c Fri Nov 27 22:44:29 2015 +0530
>@@ -24,14 +24,14 @@
> int    _is5(char*),
>        _is6(char*),
>        _is8(char*),
>-       _is9(char*),
>+       /* _is9(char*), */
>        _isk(char*),
>        _isq(char*),
>        _isv(char*),
>        _read5(Biobuf*, Prog*),
>        _read6(Biobuf*, Prog*),
>        _read8(Biobuf*, Prog*),
>-       _read9(Biobuf*, Prog*),
>+       /* _read9(Biobuf*, Prog*), */
>        _readk(Biobuf*, Prog*),
>        _readq(Biobuf*, Prog*),
>        _readv(Biobuf*, Prog*);
>@@ -63,7 +63,7 @@
>        /*[ObjSparc64]*/        {0, 0,},
>        /*[ObjAmd64]*/  "amd64 .6",     _is6, _read6,
>        /*[ObjSpim]*/   {0, 0,},
>-       /*[ObjPower64]*/        "power64 .9",   _is9, _read9,
>+       /*[ObjPower64]*/        /* "power64 .9",        _is9, _read9,
>*/
>        /*[Maxobjtype]*/        0, 0
> };
>
>That took compilation further but now it breaks at point 4 in your
>issue. I hope I won't encounter more new issues :-).
>

Ah, yes, I completely forgot about that part. :/ Good luck with the rest of the 
compilation! You'll need it!

>Cheers,

-- 
Sent from my Nexus 5 with K-9 Mail. Please excuse my brevity.

Reply via email to