From 8b0a3ac4737e7e7cfc5832ccee42c6260f4d4b61 Mon Sep 17 00:00:00 2001 From: David Given Date: Mon, 20 Jun 2022 00:18:16 +0200 Subject: [PATCH] Attempt to make work on OSX, and update the build matrix. --- .github/workflows/codeql-analysis.yml | 69 --------------------------- mach/pdp/cv/cv.c | 6 +++ mach/proto/cg/compute.c | 1 + mach/proto/cg/gencode.h | 2 +- util/LLgen/src/gencode.c | 1 + util/int/data.h | 1 + util/int/io.h | 9 ++-- util/int/switch.c | 2 + 8 files changed, 17 insertions(+), 74 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 84821333f..e69de29bb 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,69 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -name: "CodeQL" - -on: - push: - branches: [default] - pull_request: - # The branches below must be a subset of the branches above - branches: [default] - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - # Override automatic language detection by changing the below list - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - language: ['cpp'] - # Learn more... - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: make - run: make PREFIX=/tmp/acki +ack - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 diff --git a/mach/pdp/cv/cv.c b/mach/pdp/cv/cv.c index 6dbea9b0d..e5c5ffd9f 100644 --- a/mach/pdp/cv/cv.c +++ b/mach/pdp/cv/cv.c @@ -12,6 +12,7 @@ #include #include #include +#include struct exec { short a_magic; @@ -52,6 +53,11 @@ int outputfile_created; FILE *output; int rom_in_text; +static cv_int2(); +static fatal(); +static emits(); +static emit_symtab(); + char *program ; char flag ; diff --git a/mach/proto/cg/compute.c b/mach/proto/cg/compute.c index a55a1ace0..0fec25a47 100644 --- a/mach/proto/cg/compute.c +++ b/mach/proto/cg/compute.c @@ -17,6 +17,7 @@ #include "glosym.h" #include "extern.h" #include "subr.h" +#include "regvar.h" #include "salloc.h" diff --git a/mach/proto/cg/gencode.h b/mach/proto/cg/gencode.h index 467df4539..a6fb78b70 100644 --- a/mach/proto/cg/gencode.h +++ b/mach/proto/cg/gencode.h @@ -17,6 +17,6 @@ void gencode(register char *code); void genexpr(int nodeno); void gennl(void); void prtoken(token_p tp); - +void regreturn(void); #endif /* GENCODE_H_ */ diff --git a/util/LLgen/src/gencode.c b/util/LLgen/src/gencode.c index 40e4bd30e..c3c6d36e6 100644 --- a/util/LLgen/src/gencode.c +++ b/util/LLgen/src/gencode.c @@ -20,6 +20,7 @@ #include #include +#include # include "types.h" # include "io.h" # include "extern.h" diff --git a/util/int/data.h b/util/int/data.h index 5cbb97ff2..1a5dad475 100644 --- a/util/int/data.h +++ b/util/int/data.h @@ -19,6 +19,7 @@ void dt_stip(register ptr addr, ptr ap); void dt_stf(register ptr addr, double f, register size n); #endif +ptr dt_ldip(ptr addr); ptr dt_lddp(register ptr addr); unsigned long dt_ldu(register ptr addr, size n); unsigned long dt_lduw(register ptr addr); diff --git a/util/int/io.h b/util/int/io.h index 46f9bde36..439869e8d 100644 --- a/util/int/io.h +++ b/util/int/io.h @@ -8,9 +8,10 @@ #ifndef IO_H_ #define IO_H_ -void fatal(char *fmt, ...); -void message(char *fmt, ...); -void init_ofiles(int firsttime); -void close_down(int rc); +extern void fatal(char *fmt, ...); +extern void message(char *fmt, ...); +extern void init_ofiles(int firsttime); +extern void close_down(int rc); +extern void incr_mess_id(void); #endif /* IO_H_ */ diff --git a/util/int/switch.c b/util/int/switch.c index 4bc587a65..1bdd1748c 100644 --- a/util/int/switch.c +++ b/util/int/switch.c @@ -11,6 +11,8 @@ #include "trap.h" #include "warn.h" #include "switch.h" +#include "stack.h" +#include "data.h" void do_instr(unsigned int opcode) {