Closed duff2013 closed 4 years ago
Yes, please issue a pull request.
Yes, feel free to look at linux. Lcc was designed on unix and is supposed to build, but the code is old, and I ran into problems.
From: duff2013 notifications@github.com Sent: Wednesday, June 19, 2019 8:12:44 PM To: jasonful/lcc Cc: jasonful; Mention Subject: [jasonful/lcc] mac lcc build (#1)
Hi @jasonfulhttps://github.com/jasonful, I've been able to build lcc for Mac OS (10.13.6) and tested it with few very simple examples and it looks pretty good to me. I want to integrate this into my ulptool repository for building ulp assembly files with Arduino, I can issue a pull also if you would like? I can look at linux (ubuntu) also if you want.
Pouring over the source code you did to make this work, my hats off to you!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jasonful/lcc/issues/1?email_source=notifications&email_token=AHJTJWQTNIDNNLHN4EOZNP3P3LYSZA5CNFSM4HZO5OL2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G2RLX6Q, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHJTJWUFUHPO44AYUMBMOBDP3LYSZANCNFSM4HZO5OLQ.
Cool, so I was wondering if we could change the ulpcc/bin directory structure by adding folder for each architecture or however you want it to be?
Also I had to remove all instances of \u0022 in the ulp.md so I don't know how to deal with that for windows build or maybe you have an idea that could work for both windows, Mac and linux? It gives me the error:
character '"' cannot be specified by a universal character name
A subfolder per architecture makes sense.
Who is giving the \u0022 error?
From: duff2013 notifications@github.com Sent: Thursday, June 20, 2019 9:19 AM To: jasonful/lcc Cc: jasonful; Mention Subject: Re: [jasonful/lcc] mac lcc build (#1)
Cool, so I was wondering if we could change the ulpcc/bin directory structure by adding folder for each architecture or however you want it to be?
Also I had to remove all instances of \u0022 in the ulp.md so I don't know how to deal with that for windows build or maybe you have an idea that could work for both windows, Mac and linux? It gives me the error:
character '"' cannot be specified by a universal character name
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jasonful/lcc/issues/1?email_source=notifications&email_token=AHJTJWSSJKCOA5Z2AC3URODP3OUZXA5CNFSM4HZO5OL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYF5CIY#issuecomment-504090915, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHJTJWSNOERAIUTYYX2OAODP3OUZXANCNFSM4HZO5OLQ.
I believe its failing on this: cc -c -c -Isrc -o /Users/duff/Downloads/lcc_ulp/build/bin/ulp.o /Users/duff/Downloads/lcc_ulp/build/bin/ulp.c
Here is my makefile, BUILDDIR and LCCDIR is hard coded for my machine:
# $Id$ HOSTFILE=etc/irix.c TARGET=mips/irix/ TEMPDIR=/tmp BUILDDIR=/Users/duff/Downloads/lcc_ulp/build/bin LCCDIR=/Users/duff/Downloads/lcc_ulp/build/bin A=.a O=.o E= CC=cc CFLAGS=-c LD=$(CC) LDFLAGS=-c DEBUG_LEVEL=-g AR=ar ruv RANLIB=ranlib DIFF=diff RM=rm -f TSTDIR=$(BUILDDIR)/$(TARGET)/tst B=$(BUILDDIR)/ T=$(TSTDIR)/ C=$Blcc -Wo-lccdir=$(BUILDDIR) -Wf-target=$(TARGET) -Iinclude/$(TARGET)
mkfile_path := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) $(info $(mkfile_path))
what: -@echo make all rcc lburg cpp lcc bprint liblcc triple clean clobber
all:: rcc lburg cpp lcc bprint liblcc
rcc: $Brcc$E lburg: $Blburg$E cpp: $Bcpp$E lcc: $Blcc$E bprint: $Bbprint$E liblcc: $Bliblcc$A
RCCOBJS=$Balloc$O \ $Bbind$O \ $Bdag$O \ $Bdagcheck$O \ $Bdecl$O \ $Benode$O \ $Berror$O \ $Bexpr$O \ $Bevent$O \ $Binit$O \ $Binits$O \ $Binput$O \ $Blex$O \ $Blist$O \ $Bmain$O \ $Boutput$O \ $Bprof$O \ $Bprofio$O \ $Bsimp$O \ $Bstmt$O \ $Bstring$O \ $Bsym$O \ $Btrace$O \ $Btree$O \ $Btypes$O \ $Bnull$O \ $Bsymbolic$O \ $Bgen$O \ $Bbytecode$O \ $Balpha$O \ $Bmips$O \ $Bsparc$O \ $Bstab$O \ $Bx86$O \ $Bx86linux$O \ $Bulp$O
$Brcc$E:: $Bmain$O $Blibrcc$A $(EXTRAOBJS) $(LD) $(DEBUG_LEVEL) -o $@ $Bmain$O $(EXTRAOBJS) $Blibrcc$A $(EXTRALIBS)
$Blibrcc$A: $(RCCOBJS) $(AR) $@ $(RCCOBJS); $(RANLIB) $@ || true
$(RCCOBJS): src/c.h src/ops.h src/token.h src/config.h
$Balloc$O: src/alloc.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/alloc.c $Bbind$O: src/bind.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/bind.c $Bdag$O: src/dag.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/dag.c $Bdecl$O: src/decl.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/decl.c $Benode$O: src/enode.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/enode.c $Berror$O: src/error.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/error.c $Bevent$O: src/event.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/event.c $Bexpr$O: src/expr.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/expr.c $Bgen$O: src/gen.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/gen.c $Binit$O: src/init.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/init.c $Binits$O: src/inits.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/inits.c $Binput$O: src/input.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/input.c $Blex$O: src/lex.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/lex.c $Blist$O: src/list.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/list.c $Bmain$O: src/main.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/main.c $Bnull$O: src/null.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/null.c $Boutput$O: src/output.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/output.c $Bprof$O: src/prof.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/prof.c $Bprofio$O: src/profio.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/profio.c $Bsimp$O: src/simp.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/simp.c $Bstmt$O: src/stmt.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/stmt.c $Bstring$O: src/string.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/string.c $Bsym$O: src/sym.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/sym.c $Bsymbolic$O: src/symbolic.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/symbolic.c $Bbytecode$O: src/bytecode.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/bytecode.c $Btrace$O: src/trace.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/trace.c $Btree$O: src/tree.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/tree.c $Btypes$O: src/types.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/types.c $Bstab$O: src/stab.c src/stab.h; $(CC) $(CFLAGS) -c -Isrc -o $@ src/stab.c
$Bdagcheck$O: $Bdagcheck.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Bdagcheck.c $Balpha$O: $Balpha.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Balpha.c $Bmips$O: $Bmips.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Bmips.c $Bsparc$O: $Bsparc.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Bsparc.c $Bx86$O: $Bx86.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Bx86.c $Bx86linux$O: $Bx86linux.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Bx86linux.c $Bulp$O: $Bulp.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Bulp.c
$Bdagcheck.c: $Blburg$E src/dagcheck.md; $Blburg src/dagcheck.md $@ $Balpha.c: $Blburg$E src/alpha.md; $Blburg src/alpha.md $@ $Bmips.c: $Blburg$E src/mips.md; $Blburg src/mips.md $@ $Bsparc.c: $Blburg$E src/sparc.md; $Blburg src/sparc.md $@ $Bx86.c: $Blburg$E src/x86.md; $Blburg src/x86.md $@ $Bx86linux.c: $Blburg$E src/x86linux.md; $Blburg src/x86linux.md $@ $Bulp.c: $Blburg$E src/ulp.md; $Blburg src/ulp.md $@
$Bbprint$E: $Bbprint$O; $(LD) $(DEBUG_LEVEL) -o $@ $Bbprint$O $Bops$E: $Bops$O; $(LD) $(DEBUG_LEVEL) -o $@ $Bops$O
$Bbprint$O: etc/bprint.c src/profio.c; $(CC) $(CFLAGS) -c -Isrc -o $@ etc/bprint.c $Bops$O: etc/ops.c src/ops.h; $(CC) $(CFLAGS) -c -Isrc -o $@ etc/ops.c
$Blcc$E: $Blcc$O $Bhost$O; $(LD) $(DEBUG_LEVEL) -o $@ $Blcc$O $Bhost$O
$Blcc$O: etc/lcc.c; $(CC) $(CFLAGS) -c -o $@ etc/lcc.c $Bhost$O: $(HOSTFILE); $(CC) $(CFLAGS) -c -o $@ $(HOSTFILE)
$Bcp$E: etc/cp.c; $(CC) $(CFLAGS) -o $@ etc/cp.c
LIBOBJS=$Bassert$O $Bbbexit$O $Byynull$O
$Bliblcc$A: $(LIBOBJS); $(AR) $@ $Bassert$O $Bbbexit$O $Byynull$O
$Bassert$O: lib/assert.c; $(CC) -c -o $@ lib/assert.c $Byynull$O: lib/yynull.c; $(CC) -c -o $@ lib/yynull.c $Bbbexit$O: lib/bbexit.c; $(CC) -c -o $@ lib/bbexit.c
$Blburg$E: $Blburg$O $Bgram$O; $(LD) $(DEBUG_LEVEL) -o $@ $Blburg$O $Bgram$O
$Blburg$O $Bgram$O: lburg/lburg.h
$Blburg$O: lburg/lburg.c; $(CC) $(CFLAGS) -c -Ilburg -o $@ lburg/lburg.c $Bgram$O: lburg/gram.c; $(CC) $(CFLAGS) -c -Ilburg -o $@ lburg/gram.c
CPPOBJS=$Bcpp$O $Blexer$O $Bnlist$O $Btokens$O $Bmacro$O $Beval$O \ $Binclude$O $Bhideset$O $Bgetopt$O $Bunix$O
$Bcpp$E: $(CPPOBJS) $(LD) $(DEBUG_LEVEL) -o $@ $(CPPOBJS)
$(CPPOBJS): cpp/cpp.h
$Bcpp$O: cpp/cpp.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/cpp.c $Blexer$O: cpp/lex.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/lex.c $Bnlist$O: cpp/nlist.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/nlist.c $Btokens$O: cpp/tokens.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/tokens.c $Bmacro$O: cpp/macro.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/macro.c $Beval$O: cpp/eval.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/eval.c $Binclude$O: cpp/include.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/include.c $Bhideset$O: cpp/hideset.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/hideset.c $Bgetopt$O: cpp/getopt.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/getopt.c $Bunix$O: cpp/unix.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/unix.c
test: $T8q.s \ $Tarray.s \ $Tcf.s \ $Tcq.s \ $Tcvt.s \ $Tfields.s \ $Tfront.s \ $Tincr.s \ $Tinit.s \ $Tlimits.s \ $Tparanoia.s \ $Tsort.s \ $Tspill.s \ $Tstdarg.s \ $Tstruct.s \ $Tswitch.s \ $Twf1.s \ $Tyacc.s
$T8q.s: tst/8q.c tst/8q.0 all -$C -S -Wf-errout=$T8q.2 -o $T8q.s tst/8q.c fc $(TARGET)/tst/8q.sbk $T8q.s fc $(TARGET)/tst/8q.2bk $T8q.2 $C -o $T8q$E $T8q.s -$T8q$E <tst/8q.0 >$T8q.1 fc $(TARGET)/tst/8q.1bk $T8q.1 $Tarray.s: tst/array.c tst/array.0 all -$C -S -Wf-errout=$Tarray.2 -o $Tarray.s tst/array.c fc $(TARGET)/tst/array.sbk $Tarray.s fc $(TARGET)/tst/array.2bk $Tarray.2 $C -o $Tarray$E $Tarray.s -$Tarray$E <tst/array.0 >$Tarray.1 fc $(TARGET)/tst/array.1bk $Tarray.1 $Tcf.s: tst/cf.c tst/cf.0 all -$C -S -Wf-errout=$Tcf.2 -o $Tcf.s tst/cf.c fc $(TARGET)/tst/cf.sbk $Tcf.s fc $(TARGET)/tst/cf.2bk $Tcf.2 $C -o $Tcf$E $Tcf.s -$Tcf$E <tst/cf.0 >$Tcf.1 fc $(TARGET)/tst/cf.1bk $Tcf.1 $Tcq.s: tst/cq.c tst/cq.0 all -$C -S -Wf-errout=$Tcq.2 -o $Tcq.s tst/cq.c fc $(TARGET)/tst/cq.sbk $Tcq.s fc $(TARGET)/tst/cq.2bk $Tcq.2 $C -o $Tcq$E $Tcq.s -$Tcq$E <tst/cq.0 >$Tcq.1 fc $(TARGET)/tst/cq.1bk $Tcq.1 $Tcvt.s: tst/cvt.c tst/cvt.0 all -$C -S -Wf-errout=$Tcvt.2 -o $Tcvt.s tst/cvt.c fc $(TARGET)/tst/cvt.sbk $Tcvt.s fc $(TARGET)/tst/cvt.2bk $Tcvt.2 $C -o $Tcvt$E $Tcvt.s -$Tcvt$E <tst/cvt.0 >$Tcvt.1 fc $(TARGET)/tst/cvt.1bk $Tcvt.1 $Tfields.s: tst/fields.c tst/fields.0 all -$C -S -Wf-errout=$Tfields.2 -o $Tfields.s tst/fields.c fc $(TARGET)/tst/fields.sbk $Tfields.s fc $(TARGET)/tst/fields.2bk $Tfields.2 $C -o $Tfields$E $Tfields.s -$Tfields$E <tst/fields.0 >$Tfields.1 fc $(TARGET)/tst/fields.1bk $Tfields.1 $Tfront.s: tst/front.c tst/front.0 all -$C -S -Wf-errout=$Tfront.2 -o $Tfront.s tst/front.c fc $(TARGET)/tst/front.sbk $Tfront.s fc $(TARGET)/tst/front.2bk $Tfront.2 $Tincr.s: tst/incr.c tst/incr.0 all -$C -S -Wf-errout=$Tincr.2 -o $Tincr.s tst/incr.c fc $(TARGET)/tst/incr.sbk $Tincr.s fc $(TARGET)/tst/incr.2bk $Tincr.2 $C -o $Tincr$E $Tincr.s -$Tincr$E <tst/incr.0 >$Tincr.1 fc $(TARGET)/tst/incr.1bk $Tincr.1 $Tinit.s: tst/init.c tst/init.0 all -$C -S -Wf-errout=$Tinit.2 -o $Tinit.s tst/init.c fc $(TARGET)/tst/init.sbk $Tinit.s fc $(TARGET)/tst/init.2bk $Tinit.2 $C -o $Tinit$E $Tinit.s -$Tinit$E <tst/init.0 >$Tinit.1 fc $(TARGET)/tst/init.1bk $Tinit.1 $Tlimits.s: tst/limits.c tst/limits.0 all -$C -S -Wf-errout=$Tlimits.2 -o $Tlimits.s tst/limits.c fc $(TARGET)/tst/limits.sbk $Tlimits.s fc $(TARGET)/tst/limits.2bk $Tlimits.2 $C -o $Tlimits$E $Tlimits.s -$Tlimits$E <tst/limits.0 >$Tlimits.1 fc $(TARGET)/tst/limits.1bk $Tlimits.1 $Tparanoia.s: tst/paranoia.c tst/paranoia.0 all -$C -S -Wf-errout=$Tparanoia.2 -o $Tparanoia.s tst/paranoia.c fc $(TARGET)/tst/paranoia.sbk $Tparanoia.s fc $(TARGET)/tst/paranoia.2bk $Tparanoia.2 $C -o $Tparanoia$E $Tparanoia.s -$Tparanoia$E <tst/paranoia.0 >$Tparanoia.1 fc $(TARGET)/tst/paranoia.1bk $Tparanoia.1 $Tsort.s: tst/sort.c tst/sort.0 all -$C -S -Wf-errout=$Tsort.2 -o $Tsort.s tst/sort.c fc $(TARGET)/tst/sort.sbk $Tsort.s fc $(TARGET)/tst/sort.2bk $Tsort.2 $C -o $Tsort$E $Tsort.s -$Tsort$E <tst/sort.0 >$Tsort.1 fc $(TARGET)/tst/sort.1bk $Tsort.1 $Tspill.s: tst/spill.c tst/spill.0 all -$C -S -Wf-errout=$Tspill.2 -o $Tspill.s tst/spill.c fc $(TARGET)/tst/spill.sbk $Tspill.s fc $(TARGET)/tst/spill.2bk $Tspill.2 $C -o $Tspill$E $Tspill.s -$Tspill$E <tst/spill.0 >$Tspill.1 fc $(TARGET)/tst/spill.1bk $Tspill.1 $Tstdarg.s: tst/stdarg.c tst/stdarg.0 all -$C -S -Wf-errout=$Tstdarg.2 -o $Tstdarg.s tst/stdarg.c fc $(TARGET)/tst/stdarg.sbk $Tstdarg.s fc $(TARGET)/tst/stdarg.2bk $Tstdarg.2 $C -o $Tstdarg$E $Tstdarg.s -$Tstdarg$E <tst/stdarg.0 >$Tstdarg.1 fc $(TARGET)/tst/stdarg.1bk $Tstdarg.1 $Tstruct.s: tst/struct.c tst/struct.0 all -$C -S -Wf-errout=$Tstruct.2 -o $Tstruct.s tst/struct.c fc $(TARGET)/tst/struct.sbk $Tstruct.s fc $(TARGET)/tst/struct.2bk $Tstruct.2 $C -o $Tstruct$E $Tstruct.s -$Tstruct$E <tst/struct.0 >$Tstruct.1 fc $(TARGET)/tst/struct.1bk $Tstruct.1 $Tswitch.s: tst/switch.c tst/switch.0 all -$C -S -Wf-errout=$Tswitch.2 -o $Tswitch.s tst/switch.c fc $(TARGET)/tst/switch.sbk $Tswitch.s fc $(TARGET)/tst/switch.2bk $Tswitch.2 $C -o $Tswitch$E $Tswitch.s -$Tswitch$E <tst/switch.0 >$Tswitch.1 fc $(TARGET)/tst/switch.1bk $Tswitch.1 $Twf1.s: tst/wf1.c tst/wf1.0 all -$C -S -Wf-errout=$Twf1.2 -o $Twf1.s tst/wf1.c fc $(TARGET)/tst/wf1.sbk $Twf1.s fc $(TARGET)/tst/wf1.2bk $Twf1.2 $C -o $Twf1$E $Twf1.s -$Twf1$E <tst/wf1.0 >$Twf1.1 fc $(TARGET)/tst/wf1.1bk $Twf1.1 $Tyacc.s: tst/yacc.c tst/yacc.0 all -$C -S -Wf-errout=$Tyacc.2 -o $Tyacc.s tst/yacc.c fc $(TARGET)/tst/yacc.sbk $Tyacc.s fc $(TARGET)/tst/yacc.2bk $Tyacc.2 $C -o $Tyacc$E $Tyacc.s -$Tyacc$E <tst/yacc.0 >$Tyacc.1 fc $(TARGET)/tst/yacc.1bk $Tyacc.1
testclean: $(RM) $T8q$E $T8q.s $T8q.2 $T8q.1 $(RM) $Tarray$E $Tarray.s $Tarray.2 $Tarray.1 $(RM) $Tcf$E $Tcf.s $Tcf.2 $Tcf.1 $(RM) $Tcq$E $Tcq.s $Tcq.2 $Tcq.1 $(RM) $Tcvt$E $Tcvt.s $Tcvt.2 $Tcvt.1 $(RM) $Tfields$E $Tfields.s $Tfields.2 $Tfields.1 $(RM) $Tfront$E $Tfront.s $Tfront.2 $Tfront.1 $(RM) $Tincr$E $Tincr.s $Tincr.2 $Tincr.1 $(RM) $Tinit$E $Tinit.s $Tinit.2 $Tinit.1 $(RM) $Tlimits$E $Tlimits.s $Tlimits.2 $Tlimits.1 $(RM) $Tparanoia$E $Tparanoia.s $Tparanoia.2 $Tparanoia.1 $(RM) $Tsort$E $Tsort.s $Tsort.2 $Tsort.1 $(RM) $Tspill$E $Tspill.s $Tspill.2 $Tspill.1 $(RM) $Tstdarg$E $Tstdarg.s $Tstdarg.2 $Tstdarg.1 $(RM) $Tstruct$E $Tstruct.s $Tstruct.2 $Tstruct.1 $(RM) $Tswitch$E $Tswitch.s $Tswitch.2 $Tswitch.1 $(RM) $Twf1$E $Twf1.s $Twf1.2 $Twf1.1 $(RM) $Tyacc$E $Tyacc.s $Tyacc.2 $Tyacc.1
clean:: testclean $(RM) $B$O $(RM) $Bdagcheck.c $Balpha.c $Bmips.c $Bx86.c $Bsparc.c $Bx86linux.c $(RM) $Brcc1$E $Brcc1$E $B1rcc$E $B2rcc$E $(RM) $B.ilk
clobber:: clean $(RM) $Brcc$E $Blburg$E $Bcpp$E $Blcc$E $Bcp$E $Bbprint$E $Bops$E $B$A $(RM) $B.pdb $B*.pch
RCCSRCS=src/alloc.c \ src/bind.c \ src/dag.c \ src/decl.c \ src/enode.c \ src/error.c \ src/expr.c \ src/event.c \ src/init.c \ src/inits.c \ src/input.c \ src/lex.c \ src/list.c \ src/main.c \ src/output.c \ src/prof.c \ src/profio.c \ src/simp.c \ src/stmt.c \ src/string.c \ src/sym.c \ src/trace.c \ src/tree.c \ src/types.c \ src/null.c \ src/symbolic.c \ src/bytecode.c \ src/gen.c \ src/stab.c \ $Bdagcheck.c \ $Balpha.c \ $Bmips.c \ $Bsparc.c \ $Bx86linux.c \ $Bx86.c \ $Bulp.c
C=$Blcc -A -d0.6 -Wo-lccdir=$(BUILDDIR) -Isrc -I$(BUILDDIR) triple: $B2rcc$E -fc /b $B1rcc$E $B2rcc$E
$B1rcc$E: $Brcc$E $Blcc$E $Bcpp$E $C -o $@ -B$B $(RCCSRCS) $B2rcc$E: $B1rcc$E $C -o $@ -B$B1 $(RCCSRCS)
I think my makefile still needs work because I could not build lburg with LDFLAG set to -g, but now I see that setting LDFLAG to -c it's adding two -c to linker command. Sorry I'm not pro at building toolchains:)
It appears the C Standard has rules against using "universal character names" (\u notation) for characters that are expressable in the basic character set. The Microsoft C compiler let me get away with it, though. Any chance there is a flag for the Mac compiler.
Really, lburg should be smarter about strings.
From: duff2013 notifications@github.com Sent: Thursday, June 20, 2019 10:17 AM To: jasonful/lcc Cc: jasonful; Mention Subject: Re: [jasonful/lcc] mac lcc build (#1)
I believe its failing on this: cc -c -c -Isrc -o /Users/duff/Downloads/lcc_ulp/build/bin/ulp.o /Users/duff/Downloads/lcc_ulp/build/bin/ulp.c
Here is my makefile, BUILDDIR and LCCDIR is hard coded for my machine:
HOSTFILE=etc/irix.c TARGET=mips/irix/ TEMPDIR=/tmp BUILDDIR=/Users/duff/Downloads/lcc_ulp/build/bin LCCDIR=/Users/duff/Downloads/lcc_ulp/build/bin A=.a O=.o E= CC=cc CFLAGS=-c LD=$(CC) LDFLAGS=-c DEBUG_LEVEL=-g AR=ar ruv RANLIB=ranlib DIFF=diff RM=rm -f TSTDIR=$(BUILDDIR)/$(TARGET)/tst B=$(BUILDDIR)/ T=$(TSTDIR)/ C=$Blcc -Wo-lccdir=$(BUILDDIR) -Wf-target=$(TARGET) -Iinclude/$(TARGET)
mkfile_path := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) $(info $(mkfile_path))
what: -@echohttps://github.com/echo make all rcc lburg cpp lcc bprint liblcc triple clean clobber
all:: rcc lburg cpp lcc bprint liblcc
rcc: $Brcc$E lburg: $Blburg$E cpp: $Bcpp$E lcc: $Blcc$E bprint: $Bbprint$E liblcc: $Bliblcc$A
RCCOBJS=$Balloc$O $Bbind$O $Bdag$O $Bdagcheck$O $Bdecl$O $Benode$O $Berror$O $Bexpr$O $Bevent$O $Binit$O $Binits$O $Binput$O $Blex$O $Blist$O $Bmain$O $Boutput$O $Bprof$O $Bprofio$O $Bsimp$O $Bstmt$O $Bstring$O $Bsym$O $Btrace$O $Btree$O $Btypes$O $Bnull$O $Bsymbolic$O $Bgen$O $Bbytecode$O $Balpha$O $Bmips$O $Bsparc$O $Bstab$O $Bx86$O $Bx86linux$O $Bulp$O
$Brcc$E:: $Bmain$O $Blibrcc$A $(EXTRAOBJS) $(LD) $(DEBUG_LEVEL) -o $@ $Bmain$O $(EXTRAOBJS) $Blibrcc$A $(EXTRALIBS)
$Blibrcc$A: $(RCCOBJS) $(AR) $@ $(RCCOBJS); $(RANLIB) $@ || true
$(RCCOBJS): src/c.h src/ops.h src/token.h src/config.h
$Balloc$O: src/alloc.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/alloc.c $Bbind$O: src/bind.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/bind.c $Bdag$O: src/dag.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/dag.c $Bdecl$O: src/decl.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/decl.c $Benode$O: src/enode.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/enode.c $Berror$O: src/error.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/error.c $Bevent$O: src/event.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/event.c $Bexpr$O: src/expr.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/expr.c $Bgen$O: src/gen.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/gen.c $Binit$O: src/init.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/init.c $Binits$O: src/inits.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/inits.c $Binput$O: src/input.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/input.c $Blex$O: src/lex.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/lex.c $Blist$O: src/list.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/list.c $Bmain$O: src/main.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/main.c $Bnull$O: src/null.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/null.c $Boutput$O: src/output.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/output.c $Bprof$O: src/prof.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/prof.c $Bprofio$O: src/profio.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/profio.c $Bsimp$O: src/simp.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/simp.c $Bstmt$O: src/stmt.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/stmt.c $Bstring$O: src/string.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/string.c $Bsym$O: src/sym.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/sym.c $Bsymbolic$O: src/symbolic.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/symbolic.c $Bbytecode$O: src/bytecode.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/bytecode.c $Btrace$O: src/trace.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/trace.c $Btree$O: src/tree.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/tree.c $Btypes$O: src/types.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/types.c $Bstab$O: src/stab.c src/stab.h; $(CC) $(CFLAGS) -c -Isrc -o $@ src/stab.c
$Bdagcheck$O: $Bdagcheck.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Bdagcheck.c $Balpha$O: $Balpha.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Balpha.c $Bmips$O: $Bmips.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Bmips.c $Bsparc$O: $Bsparc.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Bsparc.c $Bx86$O: $Bx86.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Bx86.c $Bx86linux$O: $Bx86linux.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Bx86linux.c $Bulp$O: $Bulp.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Bulp.c
$Bdagcheck.c: $Blburg$E src/dagcheck.md; $Blburg src/dagcheck.md $@ $Balpha.c: $Blburg$E src/alpha.md; $Blburg src/alpha.md $@ $Bmips.c: $Blburg$E src/mips.md; $Blburg src/mips.md $@ $Bsparc.c: $Blburg$E src/sparc.md; $Blburg src/sparc.md $@ $Bx86.c: $Blburg$E src/x86.md; $Blburg src/x86.md $@ $Bx86linux.c: $Blburg$E src/x86linux.md; $Blburg src/x86linux.md $@ $Bulp.c: $Blburg$E src/ulp.md; $Blburg src/ulp.md $@
$Bbprint$E: $Bbprint$O; $(LD) $(DEBUG_LEVEL) -o $@ $Bbprint$O $Bops$E: $Bops$O; $(LD) $(DEBUG_LEVEL) -o $@ $Bops$O
$Bbprint$O: etc/bprint.c src/profio.c; $(CC) $(CFLAGS) -c -Isrc -o $@ etc/bprint.c $Bops$O: etc/ops.c src/ops.h; $(CC) $(CFLAGS) -c -Isrc -o $@ etc/ops.c
$Blcc$E: $Blcc$O $Bhost$O; $(LD) $(DEBUG_LEVEL) -o $@ $Blcc$O $Bhost$O
$Blcc$O: etc/lcc.c; $(CC) $(CFLAGS) -c -o $@ etc/lcc.c $Bhost$O: $(HOSTFILE); $(CC) $(CFLAGS) -c -o $@ $(HOSTFILE)
$Bcp$E: etc/cp.c; $(CC) $(CFLAGS) -o $@ etc/cp.c
LIBOBJS=$Bassert$O $Bbbexit$O $Byynull$O
$Bliblcc$A: $(LIBOBJS); $(AR) $@ $Bassert$O $Bbbexit$O $Byynull$O
$Bassert$O: lib/assert.c; $(CC) -c -o $@ lib/assert.c $Byynull$O: lib/yynull.c; $(CC) -c -o $@ lib/yynull.c $Bbbexit$O: lib/bbexit.c; $(CC) -c -o $@ lib/bbexit.c
$Blburg$E: $Blburg$O $Bgram$O; $(LD) $(DEBUG_LEVEL) -o $@ $Blburg$O $Bgram$O
$Blburg$O $Bgram$O: lburg/lburg.h
$Blburg$O: lburg/lburg.c; $(CC) $(CFLAGS) -c -Ilburg -o $@ lburg/lburg.c $Bgram$O: lburg/gram.c; $(CC) $(CFLAGS) -c -Ilburg -o $@ lburg/gram.c
CPPOBJS=$Bcpp$O $Blexer$O $Bnlist$O $Btokens$O $Bmacro$O $Beval$O $Binclude$O $Bhideset$O $Bgetopt$O $Bunix$O
$Bcpp$E: $(CPPOBJS) $(LD) $(DEBUG_LEVEL) -o $@ $(CPPOBJS)
$(CPPOBJS): cpp/cpp.h
$Bcpp$O: cpp/cpp.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/cpp.c $Blexer$O: cpp/lex.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/lex.c $Bnlist$O: cpp/nlist.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/nlist.c $Btokens$O: cpp/tokens.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/tokens.c $Bmacro$O: cpp/macro.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/macro.c $Beval$O: cpp/eval.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/eval.c $Binclude$O: cpp/include.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/include.c $Bhideset$O: cpp/hideset.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/hideset.c $Bgetopt$O: cpp/getopt.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/getopt.c $Bunix$O: cpp/unix.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/unix.c
test: $T8q.s $Tarray.s $Tcf.s $Tcq.s $Tcvt.s $Tfields.s $Tfront.s $Tincr.s $Tinit.s $Tlimits.s $Tparanoia.s $Tsort.s $Tspill.s $Tstdarg.s $Tstruct.s $Tswitch.s $Twf1.s $Tyacc.s
$T8q.s: tst/8q.c tst/8q.0 all -$C -S -Wf-errout=$T8q.2 -o $T8q.s tst/8q.c fc $(TARGET)/tst/8q.sbk $T8q.s fc $(TARGET)/tst/8q.2bk $T8q.2 $C -o $T8q$E $T8q.s -$T8q$E <tst/8q.0 >$T8q.1 fc $(TARGET)/tst/8q.1bk $T8q.1 $Tarray.s: tst/array.c tst/array.0 all -$C -S -Wf-errout=$Tarray.2 -o $Tarray.s tst/array.c fc $(TARGET)/tst/array.sbk $Tarray.s fc $(TARGET)/tst/array.2bk $Tarray.2 $C -o $Tarray$E $Tarray.s -$Tarray$E <tst/array.0 >$Tarray.1 fc $(TARGET)/tst/array.1bk $Tarray.1 $Tcf.s: tst/cf.c tst/cf.0 all -$C -S -Wf-errout=$Tcf.2 -o $Tcf.s tst/cf.c fc $(TARGET)/tst/cf.sbk $Tcf.s fc $(TARGET)/tst/cf.2bk $Tcf.2 $C -o $Tcf$E $Tcf.s -$Tcf$E <tst/cf.0 >$Tcf.1 fc $(TARGET)/tst/cf.1bk $Tcf.1 $Tcq.s: tst/cq.c tst/cq.0 all -$C -S -Wf-errout=$Tcq.2 -o $Tcq.s tst/cq.c fc $(TARGET)/tst/cq.sbk $Tcq.s fc $(TARGET)/tst/cq.2bk $Tcq.2 $C -o $Tcq$E $Tcq.s -$Tcq$E <tst/cq.0 >$Tcq.1 fc $(TARGET)/tst/cq.1bk $Tcq.1 $Tcvt.s: tst/cvt.c tst/cvt.0 all -$C -S -Wf-errout=$Tcvt.2 -o $Tcvt.s tst/cvt.c fc $(TARGET)/tst/cvt.sbk $Tcvt.s fc $(TARGET)/tst/cvt.2bk $Tcvt.2 $C -o $Tcvt$E $Tcvt.s -$Tcvt$E <tst/cvt.0 >$Tcvt.1 fc $(TARGET)/tst/cvt.1bk $Tcvt.1 $Tfields.s: tst/fields.c tst/fields.0 all -$C -S -Wf-errout=$Tfields.2 -o $Tfields.s tst/fields.c fc $(TARGET)/tst/fields.sbk $Tfields.s fc $(TARGET)/tst/fields.2bk $Tfields.2 $C -o $Tfields$E $Tfields.s -$Tfields$E <tst/fields.0 >$Tfields.1 fc $(TARGET)/tst/fields.1bk $Tfields.1 $Tfront.s: tst/front.c tst/front.0 all -$C -S -Wf-errout=$Tfront.2 -o $Tfront.s tst/front.c fc $(TARGET)/tst/front.sbk $Tfront.s fc $(TARGET)/tst/front.2bk $Tfront.2 $Tincr.s: tst/incr.c tst/incr.0 all -$C -S -Wf-errout=$Tincr.2 -o $Tincr.s tst/incr.c fc $(TARGET)/tst/incr.sbk $Tincr.s fc $(TARGET)/tst/incr.2bk $Tincr.2 $C -o $Tincr$E $Tincr.s -$Tincr$E <tst/incr.0 >$Tincr.1 fc $(TARGET)/tst/incr.1bk $Tincr.1 $Tinit.s: tst/init.c tst/init.0 all -$C -S -Wf-errout=$Tinit.2 -o $Tinit.s tst/init.c fc $(TARGET)/tst/init.sbk $Tinit.s fc $(TARGET)/tst/init.2bk $Tinit.2 $C -o $Tinit$E $Tinit.s -$Tinit$E <tst/init.0 >$Tinit.1 fc $(TARGET)/tst/init.1bk $Tinit.1 $Tlimits.s: tst/limits.c tst/limits.0 all -$C -S -Wf-errout=$Tlimits.2 -o $Tlimits.s tst/limits.c fc $(TARGET)/tst/limits.sbk $Tlimits.s fc $(TARGET)/tst/limits.2bk $Tlimits.2 $C -o $Tlimits$E $Tlimits.s -$Tlimits$E <tst/limits.0 >$Tlimits.1 fc $(TARGET)/tst/limits.1bk $Tlimits.1 $Tparanoia.s: tst/paranoia.c tst/paranoia.0 all -$C -S -Wf-errout=$Tparanoia.2 -o $Tparanoia.s tst/paranoia.c fc $(TARGET)/tst/paranoia.sbk $Tparanoia.s fc $(TARGET)/tst/paranoia.2bk $Tparanoia.2 $C -o $Tparanoia$E $Tparanoia.s -$Tparanoia$E <tst/paranoia.0 >$Tparanoia.1 fc $(TARGET)/tst/paranoia.1bk $Tparanoia.1 $Tsort.s: tst/sort.c tst/sort.0 all -$C -S -Wf-errout=$Tsort.2 -o $Tsort.s tst/sort.c fc $(TARGET)/tst/sort.sbk $Tsort.s fc $(TARGET)/tst/sort.2bk $Tsort.2 $C -o $Tsort$E $Tsort.s -$Tsort$E <tst/sort.0 >$Tsort.1 fc $(TARGET)/tst/sort.1bk $Tsort.1 $Tspill.s: tst/spill.c tst/spill.0 all -$C -S -Wf-errout=$Tspill.2 -o $Tspill.s tst/spill.c fc $(TARGET)/tst/spill.sbk $Tspill.s fc $(TARGET)/tst/spill.2bk $Tspill.2 $C -o $Tspill$E $Tspill.s -$Tspill$E <tst/spill.0 >$Tspill.1 fc $(TARGET)/tst/spill.1bk $Tspill.1 $Tstdarg.s: tst/stdarg.c tst/stdarg.0 all -$C -S -Wf-errout=$Tstdarg.2 -o $Tstdarg.s tst/stdarg.c fc $(TARGET)/tst/stdarg.sbk $Tstdarg.s fc $(TARGET)/tst/stdarg.2bk $Tstdarg.2 $C -o $Tstdarg$E $Tstdarg.s -$Tstdarg$E <tst/stdarg.0 >$Tstdarg.1 fc $(TARGET)/tst/stdarg.1bk $Tstdarg.1 $Tstruct.s: tst/struct.c tst/struct.0 all -$C -S -Wf-errout=$Tstruct.2 -o $Tstruct.s tst/struct.c fc $(TARGET)/tst/struct.sbk $Tstruct.s fc $(TARGET)/tst/struct.2bk $Tstruct.2 $C -o $Tstruct$E $Tstruct.s -$Tstruct$E <tst/struct.0 >$Tstruct.1 fc $(TARGET)/tst/struct.1bk $Tstruct.1 $Tswitch.s: tst/switch.c tst/switch.0 all -$C -S -Wf-errout=$Tswitch.2 -o $Tswitch.s tst/switch.c fc $(TARGET)/tst/switch.sbk $Tswitch.s fc $(TARGET)/tst/switch.2bk $Tswitch.2 $C -o $Tswitch$E $Tswitch.s -$Tswitch$E <tst/switch.0 >$Tswitch.1 fc $(TARGET)/tst/switch.1bk $Tswitch.1 $Twf1.s: tst/wf1.c tst/wf1.0 all -$C -S -Wf-errout=$Twf1.2 -o $Twf1.s tst/wf1.c fc $(TARGET)/tst/wf1.sbk $Twf1.s fc $(TARGET)/tst/wf1.2bk $Twf1.2 $C -o $Twf1$E $Twf1.s -$Twf1$E <tst/wf1.0 >$Twf1.1 fc $(TARGET)/tst/wf1.1bk $Twf1.1 $Tyacc.s: tst/yacc.c tst/yacc.0 all -$C -S -Wf-errout=$Tyacc.2 -o $Tyacc.s tst/yacc.c fc $(TARGET)/tst/yacc.sbk $Tyacc.s fc $(TARGET)/tst/yacc.2bk $Tyacc.2 $C -o $Tyacc$E $Tyacc.s -$Tyacc$E <tst/yacc.0 >$Tyacc.1 fc $(TARGET)/tst/yacc.1bk $Tyacc.1
testclean: $(RM) $T8q$E $T8q.s $T8q.2 $T8q.1 $(RM) $Tarray$E $Tarray.s $Tarray.2 $Tarray.1 $(RM) $Tcf$E $Tcf.s $Tcf.2 $Tcf.1 $(RM) $Tcq$E $Tcq.s $Tcq.2 $Tcq.1 $(RM) $Tcvt$E $Tcvt.s $Tcvt.2 $Tcvt.1 $(RM) $Tfields$E $Tfields.s $Tfields.2 $Tfields.1 $(RM) $Tfront$E $Tfront.s $Tfront.2 $Tfront.1 $(RM) $Tincr$E $Tincr.s $Tincr.2 $Tincr.1 $(RM) $Tinit$E $Tinit.s $Tinit.2 $Tinit.1 $(RM) $Tlimits$E $Tlimits.s $Tlimits.2 $Tlimits.1 $(RM) $Tparanoia$E $Tparanoia.s $Tparanoia.2 $Tparanoia.1 $(RM) $Tsort$E $Tsort.s $Tsort.2 $Tsort.1 $(RM) $Tspill$E $Tspill.s $Tspill.2 $Tspill.1 $(RM) $Tstdarg$E $Tstdarg.s $Tstdarg.2 $Tstdarg.1 $(RM) $Tstruct$E $Tstruct.s $Tstruct.2 $Tstruct.1 $(RM) $Tswitch$E $Tswitch.s $Tswitch.2 $Tswitch.1 $(RM) $Twf1$E $Twf1.s $Twf1.2 $Twf1.1 $(RM) $Tyacc$E $Tyacc.s $Tyacc.2 $Tyacc.1
clean:: testclean $(RM) $B$O $(RM) $Bdagcheck.c $Balpha.c $Bmips.c $Bx86.c $Bsparc.c $Bx86linux.c $(RM) $Brcc1$E $Brcc1$E $B1rcc$E $B2rcc$E $(RM) $B.ilk
clobber:: clean $(RM) $Brcc$E $Blburg$E $Bcpp$E $Blcc$E $Bcp$E $Bbprint$E $Bops$E $B$A $(RM) $B.pdb $B*.pch
RCCSRCS=src/alloc.c src/bind.c src/dag.c src/decl.c src/enode.c src/error.c src/expr.c src/event.c src/init.c src/inits.c src/input.c src/lex.c src/list.c src/main.c src/output.c src/prof.c src/profio.c src/simp.c src/stmt.c src/string.c src/sym.c src/trace.c src/tree.c src/types.c src/null.c src/symbolic.c src/bytecode.c src/gen.c src/stab.c $Bdagcheck.c $Balpha.c $Bmips.c $Bsparc.c $Bx86linux.c $Bx86.c $Bulp.c
C=$Blcc -A -d0.6 -Wo-lccdir=$(BUILDDIR) -Isrc -I$(BUILDDIR) triple: $B2rcc$E -fc /b $B1rcc$E $B2rcc$E
$B1rcc$E: $Brcc$E $Blcc$E $Bcpp$E $C -o $@ -B$B $(RCCSRCS) $B2rcc$E: $B1rcc$E $C -o $@ -B$B1 $(RCCSRCS)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jasonful/lcc/issues/1?email_source=notifications&email_token=AHJTJWTWPVJ2W7YNYRHIMETP3O3TVA5CNFSM4HZO5OL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYGBXNI#issuecomment-504110005, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHJTJWRHBMXFKRKAC7A7BQ3P3O3TVANCNFSM4HZO5OLQ.
I can't find a flag for Mac compiler gcc 4.2.1.
could you explicitly spell out UTF-8 in your string literal like /0x22?
Okay, I changed the escape sequence.
From: duff2013 notifications@github.com Sent: Thursday, June 20, 2019 7:47:06 PM To: jasonful/lcc Cc: jasonful; Mention Subject: Re: [jasonful/lcc] mac lcc build (#1)
could you explicitly spell out UTF-8 in your string literal like /0x00/0x22?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jasonful/lcc/issues/1?email_source=notifications&email_token=AHJTJWUIPSI2TKSUHLWQJH3P3Q6KVA5CNFSM4HZO5OL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYHIN3Y#issuecomment-504268527, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHJTJWU6D7NSUGA7DWKK7H3P3Q6KVANCNFSM4HZO5OLQ.
that works, I'm going to compile all your example files and make sure there are no errors that pop up on my end with the Mac then I will take the .S files and put them into a Arduino sketch and try to make them run with my ulptool.
One thing I do notice is the formatting of the assembly is a bit weird, not a big deal but is there a way to edit how these assembly files are formatted for easier reading?
You could add spaces to the strings in the ulp.md file to try to make the indentation prettier. I did add a few indents for globals to try to make it a little easier to read; maybe that's what you find weird?
From: duff2013 notifications@github.com Sent: Friday, June 21, 2019 11:57 AM To: jasonful/lcc Cc: jasonful; Mention Subject: Re: [jasonful/lcc] mac lcc build (#1)
that works, I'm going to compile all your example files and make sure there are no errors that pop up on my end with the Mac then I will take the .S files and put them into a Arduino sketch and try to make them run with my ulptool.
One thing I do notice is the formatting of the assembly is a bit weird, not a big deal but is there a way to edit how these assembly files are formatted for easier reading?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jasonful/lcc/issues/1?email_source=notifications&email_token=AHJTJWSFZQ3RMQFFPQJ75XTP3UQC3A5CNFSM4HZO5OL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYJJ2GI#issuecomment-504536345, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHJTJWXMNAPIBFR7CC2IGQDP3UQC3ANCNFSM4HZO5OLQ.
Yes, the indentation is what I'm talking about.
I was able to hack this and compile on linux. Basically I took makefile.nt and tweaked paths and compiler flags. Also had to tweak etc/linux.c to look for tools in appropriate paths. Didn't check if files generated work.
Great. A couple things:
From: Marcin Bukat notifications@github.com Sent: Thursday, June 27, 2019 1:56:26 AM To: jasonful/lcc Cc: jasonful; Mention Subject: Re: [jasonful/lcc] mac lcc build (#1)
I was able to hack this and compile on linux. Basically I took makefile.nt and tweaked paths and compiler flags. Also had to tweak etc/linux.c to look for tools in appropriate paths. Didn't check if files generated work.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jasonful/lcc/issues/1?email_source=notifications&email_token=AHJTJWXY5T7VDNLXDR7JFDLP4R6DVA5CNFSM4HZO5OL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYWOE7A#issuecomment-506258044, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHJTJWWXSCJKG427UQRWWYTP4R6DVANCNFSM4HZO5OLQ.
Not sure why my pull for the R0 fix added in all the other stuff I uploaded last night. I wanted to add pulls in little chunks so we could talk about them. I think I'll close that pull and start again.
edit: I deleted my fork and pull and reforked it again so hopefully this doesn't happen again.
@duff2013 I have someone else trying to get a mac build going. Could I ask a favor and get you to submit a pull request with your stuff?
Sure give me a few days.
I'm getting an error building because in unix.c the memmove function conflicts with my systems memmove, so I added a os specific macro to unix.c for windows builds like so:
#if defined(_WIN32)
/* memmove is defined here because some vendors don't provide it at
all and others do a terrible job (like calling malloc) */
void *
memmove(void *dp, const void *sp, size_t n)
{
unsigned char *cdp, *csp;
if (n==0)
return 0;
cdp = dp;
csp = (unsigned char *)sp;
if (cdp < csp) {
do {
*cdp++ = *csp++;
} while (--n);
} else {
cdp += n;
csp += n;
do {
*--cdp = *--csp;
} while (--n);
}
return 0;
}
#endif
Is there a better way of doing this, haven't checked the linux build yet either.
memmove does not seem necessary even under Windows.
I'll just comment it out then, also I'm adding a new folder: .../ulpcc/bin/darwin for the Mac binaries.
Thanks for your changes. https://github.com/jasonful/lcc/commit/d6ca1e9abf59acf696aa822ed615977affbb302f
Hi @jasonful, I've been able to build lcc for Mac OS (10.13.6) and tested it with few very simple examples and it looks pretty good to me. I want to integrate this into my ulptool repository for building ulp assembly files with Arduino, I can issue a pull also if you would like? I can look at linux (ubuntu) also if you want.
Pouring over the source code you did to make this work, my hats off to you!