From d4a9420bc7ddeb1d475c54751f547d6474557eac Mon Sep 17 00:00:00 2001 From: Armin Friedl Date: Sun, 3 Jan 2021 13:16:52 +0100 Subject: [PATCH] Patch PA4 for missing yylex libfl is missing yylex symbol. Since libfl is not necessary for the semantic analyzer, just remove `-lfl` from the Makefile. --- Dockerfile | 3 ++- Makefile.patch | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 Makefile.patch diff --git a/Dockerfile b/Dockerfile index a67549d..58bfb17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -85,7 +85,8 @@ RUN sed -i 's/-zx/-ozx/g' \ # c) fix mangling errors of yylex when compiled with a c++ compiler # d) be as non-invasive as possible to the existing assignment code RUN patch -u /usr/class/assignments/PA2/cool.flex -i /tmp/build/cool.flex.patch \ - && patch -u /usr/class/assignments/PA3/cool.y -i /tmp/build/cool.y.patch + && patch -u /usr/class/assignments/PA3/cool.y -i /tmp/build/cool.y.patch \ + && patch -u /usr/class/assignments/PA4/Makefile -i /tmp/build/Makefile.patch # Setup working directory RUN mkdir -p /class diff --git a/Makefile.patch b/Makefile.patch new file mode 100644 index 0000000..e5178f3 --- /dev/null +++ b/Makefile.patch @@ -0,0 +1,11 @@ +--- Makefile 2021-01-03 12:11:07.454989428 +0000 ++++ Makefile.work 2021-01-03 12:15:19.965132466 +0000 +@@ -2,7 +2,7 @@ + ASSN = 4 + CLASS= cs143 + CLASSDIR= ../.. +-LIB= -L/usr/pubsw/lib -lfl ++LIB= -L/usr/pubsw/lib + AR= gar + ARCHIVE_NEW= -cr + RANLIB= gar -qs