This patch to LLVM is required by the developers of the Extempore language. The following explanation was posted to the extemporelang@googlegroups.com mailing list: "There is an assumption in the parser that all definitions occur within the same compilation unit - i.e. the parser has local state about what has been parsed in this unit of work. Extempore obviously does lots of little units rather than one big unit and this causes problems for named types that were defined in another unit - which they always are. The patch simply checks the current module to see if the type has been previously defined, and intervenes appropriately if it has." Message-ID: --- llvm-3.7.1.src/include/llvm/MC/MCSectionCOFF.h 2015-04-11 12:11:45.000000000 +1000 +++ llvm-3.7.1.src/include/llvm/MC/MCSectionCOFF.h 2015-09-14 09:22:56.000000000 +1000 @@ -16,7 +16,6 @@ #include "llvm/ADT/StringRef.h" #include "llvm/MC/MCSection.h" -#include "llvm/Support/COFF.h" namespace llvm { class MCSymbol; --- llvm-3.7.1.src/lib/AsmParser/LLParser.cpp 2015-07-11 20:30:36.000000000 +1000 +++ llvm-3.7.1.src/lib/AsmParser/LLParser.cpp 2015-09-14 09:20:57.000000000 +1000 @@ -1754,8 +1754,14 @@ // If the type hasn't been defined yet, create a forward definition and // remember where that forward def'n was seen (in case it never is defined). if (!Entry.first) { - Entry.first = StructType::create(Context, Lex.getStrVal()); - Entry.second = Lex.getLoc(); + // this here for extempore + if (M->getTypeByName(Lex.getStrVal())) { + Entry.first = M->getTypeByName(Lex.getStrVal()); + Entry.second = SMLoc(); + } else { + Entry.first = StructType::create(Context, Lex.getStrVal()); + Entry.second = Lex.getLoc(); + } } Result = Entry.first; Lex.Lex(); --- llvm-3.7.1.src/lib/CodeGen/TargetLoweringObjectFileImpl.cpp 2015-07-01 05:10:31.000000000 +1000 +++ llvm-3.7.1.src/lib/CodeGen/TargetLoweringObjectFileImpl.cpp 2015-09-14 09:23:40.000000000 +1000 @@ -32,6 +32,7 @@ #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCSymbolELF.h" #include "llvm/MC/MCValue.h" +#include "llvm/Support/COFF.h" #include "llvm/Support/Dwarf.h" #include "llvm/Support/ELF.h" #include "llvm/Support/ErrorHandling.h" --- llvm-3.7.1.src/lib/ExecutionEngine/MCJIT/MCJIT.cpp 2015-07-31 02:31:16.000000000 +1000 +++ llvm-3.7.1.src/lib/ExecutionEngine/MCJIT/MCJIT.cpp 2015-09-14 09:21:28.000000000 +1000 @@ -524,6 +524,17 @@ rv.IntVal = APInt(32, PF(ArgValues[0].IntVal.getZExtValue())); return rv; } + if (FTy->getNumParams() == 1 && + RetTy->isVoidTy() && + FTy->getParamType(0)->isPointerTy()) { + GenericValue rv; + //void (*PF)(char *) = (void(*)(char *))(intptr_t)FPtr; + //printf("are symbols available: %d\n",isSymbolSearchingDisabled()); + void (*PF)(char *) = (void(*)(char *))FPtr; + char* mzone = (char*) GVTOP(ArgValues[0]); + PF(mzone); + return rv; + } break; } } --- llvm-3.7.1.src/lib/MC/MCContext.cpp 2015-06-23 21:31:32.000000000 +1000 +++ llvm-3.7.1.src/lib/MC/MCContext.cpp 2015-09-14 09:24:01.000000000 +1000 @@ -23,6 +23,7 @@ #include "llvm/MC/MCSymbolCOFF.h" #include "llvm/MC/MCSymbolELF.h" #include "llvm/MC/MCSymbolMachO.h" +#include "llvm/Support/COFF.h" #include "llvm/Support/ELF.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/FileSystem.h" --- llvm-3.7.1.src/lib/MC/MCObjectFileInfo.cpp 2015-06-25 10:28:42.000000000 +1000 +++ llvm-3.7.1.src/lib/MC/MCObjectFileInfo.cpp 2015-09-14 09:24:17.000000000 +1000 @@ -16,6 +16,7 @@ #include "llvm/MC/MCSectionCOFF.h" #include "llvm/MC/MCSectionELF.h" #include "llvm/MC/MCSectionMachO.h" +#include "llvm/Support/COFF.h" using namespace llvm; static bool useCompactUnwind(const Triple &T) { --- llvm-3.7.1.src/lib/MC/MCSectionCOFF.cpp 2015-06-09 10:31:39.000000000 +1000 +++ llvm-3.7.1.src/lib/MC/MCSectionCOFF.cpp 2015-09-14 09:24:25.000000000 +1000 @@ -11,6 +11,7 @@ #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCSymbol.h" +#include "llvm/Support/COFF.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; --- llvm-3.7.1.src/lib/Target/X86/X86TargetObjectFile.cpp 2015-06-27 04:55:48.000000000 +1000 +++ llvm-3.7.1.src/lib/Target/X86/X86TargetObjectFile.cpp 2015-09-14 09:25:03.000000000 +1000 @@ -16,6 +16,7 @@ #include "llvm/MC/MCSectionCOFF.h" #include "llvm/MC/MCSectionELF.h" #include "llvm/MC/MCValue.h" +#include "llvm/Support/COFF.h" #include "llvm/Support/Dwarf.h" #include "llvm/Target/TargetLowering.h" fallback for timestamp. This fixes running from a tarball. * Makefile.am (EXTRA_DIST): Add it. Change-Id: Ic487587b22495868fd2a21545a13dc9e3458299c Janneke Nieuwenhuizen 2024-04-14maint: Fix header....* build-aux/xgettext.scm: Add `Guix' parts to header. Change-Id: I4fb03b8b0588f0482bcb1a095518b6751d111031 Janneke Nieuwenhuizen 2024-04-14maint: Use xgettext.scm wrapper to create .PO files reproducibly....* build-aux/xgettext.scm: New script. * po/guix/Makevars (XGETTEXT): Set it. (XGETTEXT_OPTIONS): Add --xgettext option to `real' xgettext. * po/packages/Makevars (XGETTEXT): Set it. (XGETTEXT_OPTIONS): Add --xgettext option to `real' xgettext. Change-Id: I71b6b843970090f765f46ac346b92a346560e3f0 Janneke Nieuwenhuizen 2024-01-05build: test-driver.scm: Set mode....Emacs auto-detects the build-aux/test-driver.scm as sh-mode, due to the shebang. So override the auto-detection using a local variable forcing scheme-mode. * build-aux/test-driver.scm: Set mode to scheme. Change-Id: I07f12656dba5fb7b52447b94569307a2a605ffc1 Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Tomas Volf 2023-08-21maint: Add 'etc/hurd-manifest.scm'....* build-aux/cuirass/hurd-manifest.scm: Move to... * etc/hurd-manifest.scm: ...here. * Makefile.am (EXTRA_DIST): Update accordingly. Janneke Nieuwenhuizen