Merge branch 'cc65:master' into master
This commit is contained in:
62
.github/workflows/build-on-pull-request.yml
vendored
Normal file
62
.github/workflows/build-on-pull-request.yml
vendored
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
name: Build Pull Request
|
||||||
|
on: [pull_request]
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_linux:
|
||||||
|
name: Build and Test (Linux)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install Dependencies
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install linuxdoc-tools-info gcc-mingw-w64-x86-64
|
||||||
|
|
||||||
|
- shell: bash
|
||||||
|
run: git config --global core.autocrlf input
|
||||||
|
- name: Checkout Source
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Build the tools.
|
||||||
|
shell: bash
|
||||||
|
run: make -j2 bin USER_CFLAGS=-Werror
|
||||||
|
- name: Build the platform libraries.
|
||||||
|
shell: bash
|
||||||
|
run: make -j2 lib QUIET=1
|
||||||
|
- name: Run the regression tests.
|
||||||
|
shell: bash
|
||||||
|
run: make test QUIET=1
|
||||||
|
- name: Test that the samples can be built.
|
||||||
|
shell: bash
|
||||||
|
run: make -j2 samples
|
||||||
|
- name: Build the document files.
|
||||||
|
shell: bash
|
||||||
|
run: make -j2 doc
|
||||||
|
- name: Build 64-bit Windows versions of the tools.
|
||||||
|
run: |
|
||||||
|
make -C src clean
|
||||||
|
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32-
|
||||||
|
|
||||||
|
build_windows:
|
||||||
|
name: Build (Windows)
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- shell: bash
|
||||||
|
run: git config --global core.autocrlf input
|
||||||
|
|
||||||
|
- name: Checkout Source
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Add msbuild to PATH
|
||||||
|
uses: microsoft/setup-msbuild@v1.1
|
||||||
|
|
||||||
|
- name: Build app (debug)
|
||||||
|
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug
|
||||||
|
|
||||||
|
- name: Build app (release)
|
||||||
|
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release
|
||||||
91
.github/workflows/snapshot-on-push-master.yml
vendored
Normal file
91
.github/workflows/snapshot-on-push-master.yml
vendored
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
name: Snapshot Build
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
master
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_windows:
|
||||||
|
name: Build (Windows)
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- shell: bash
|
||||||
|
run: git config --global core.autocrlf input
|
||||||
|
|
||||||
|
- name: Checkout Source
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Add msbuild to PATH
|
||||||
|
uses: microsoft/setup-msbuild@v1.1
|
||||||
|
|
||||||
|
- name: Build app (debug)
|
||||||
|
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug
|
||||||
|
|
||||||
|
- name: Build app (release)
|
||||||
|
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release
|
||||||
|
|
||||||
|
build_linux:
|
||||||
|
name: Build, Test and Snaphot (Linux)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build_windows
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install Dependencies
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install linuxdoc-tools-info gcc-mingw-w64-x86-64 gcc-mingw-w64-i686
|
||||||
|
|
||||||
|
- shell: bash
|
||||||
|
run: git config --global core.autocrlf input
|
||||||
|
- name: Checkout Source
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Build the tools.
|
||||||
|
shell: bash
|
||||||
|
run: make -j2 bin USER_CFLAGS=-Werror
|
||||||
|
- name: Build the platform libraries.
|
||||||
|
shell: bash
|
||||||
|
run: make -j2 lib QUIET=1
|
||||||
|
- name: Run the regression tests.
|
||||||
|
shell: bash
|
||||||
|
run: make test QUIET=1
|
||||||
|
- name: Test that the samples can be built.
|
||||||
|
shell: bash
|
||||||
|
run: make -j2 samples
|
||||||
|
- name: Remove the output from the samples tests.
|
||||||
|
shell: bash
|
||||||
|
run: make -C samples clean
|
||||||
|
- name: Build the document files.
|
||||||
|
shell: bash
|
||||||
|
run: make -j2 doc
|
||||||
|
- name: Build and package 64-bit Windows versions of the tools.
|
||||||
|
run: |
|
||||||
|
make -C src clean
|
||||||
|
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32-
|
||||||
|
make zip
|
||||||
|
mv cc65.zip cc65-win64.zip
|
||||||
|
- name: Build and package 32-bit Windows versions of the tools.
|
||||||
|
run: |
|
||||||
|
make -C src clean
|
||||||
|
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
|
||||||
|
make zip
|
||||||
|
mv cc65.zip cc65-win32.zip
|
||||||
|
|
||||||
|
- name: Upload a 32-bit Snapshot Zip
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: cc65-snapshot-win32.zip
|
||||||
|
path: cc65-win32.zip
|
||||||
|
- name: Upload a 64-bit Snapshot Zip
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: cc65-snapshot-win64.zip
|
||||||
|
path: cc65-win64.zip
|
||||||
|
|
||||||
|
# TODO: Update docs at https://github.com/cc65/doc
|
||||||
|
# TODO: Publish snapshot zip at https://github.com/cc65/cc65.github.io
|
||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
[Wiki](https://github.com/cc65/wiki/wiki)
|
[Wiki](https://github.com/cc65/wiki/wiki)
|
||||||
|
|
||||||
|
[](https://github.com/cc65/cc65/actions/workflows/snapshot-on-push-master.yml)
|
||||||
|
|
||||||
cc65 is a complete cross development package for 65(C)02 systems, including
|
cc65 is a complete cross development package for 65(C)02 systems, including
|
||||||
a powerful macro assembler, a C compiler, linker, librarian and several
|
a powerful macro assembler, a C compiler, linker, librarian and several
|
||||||
other tools.
|
other tools.
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ more information.
|
|||||||
|
|
||||||
The standard binary file format generated by the linker for the
|
The standard binary file format generated by the linker for the
|
||||||
Apple ][ target is an <url name="AppleSingle"
|
Apple ][ target is an <url name="AppleSingle"
|
||||||
url="http://kaiser-edv.de/documents/AppleSingle_AppleDouble.pdf"> file.
|
url="https://nulib.com/library/AppleSingle_AppleDouble.pdf"> file.
|
||||||
The default load address is $803.
|
The default load address is $803.
|
||||||
|
|
||||||
<bf/AppleCommander 1.4.0/ or later (available at <url
|
<bf/AppleCommander 1.4.0/ or later (available at <url
|
||||||
@@ -281,7 +281,7 @@ AppleCommander option to put LOADER.SYSTEM on a ProDOS 8 disk image is <tt/-p/.
|
|||||||
If the cc65 program can be successfully linked as system program using the linker
|
If the cc65 program can be successfully linked as system program using the linker
|
||||||
configuration <ref id="apple-sys-cfg" name="apple2-system.cfg">, but
|
configuration <ref id="apple-sys-cfg" name="apple2-system.cfg">, but
|
||||||
uses the heap either explicitly or implicitly (i.e. by loading a driver) then
|
uses the heap either explicitly or implicitly (i.e. by loading a driver) then
|
||||||
the memory from $800 to $2000 can be added to the heap by calling
|
the memory from $800 to $1FFF can be added to the heap by calling
|
||||||
<tt/_heapadd ((void *) 0x0800, 0x1800);/ at the beginning of <tt/main()/.
|
<tt/_heapadd ((void *) 0x0800, 0x1800);/ at the beginning of <tt/main()/.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ more information.
|
|||||||
|
|
||||||
The standard binary file format generated by the linker for the
|
The standard binary file format generated by the linker for the
|
||||||
enhanced Apple //e target is an <url name="AppleSingle"
|
enhanced Apple //e target is an <url name="AppleSingle"
|
||||||
url="http://kaiser-edv.de/documents/AppleSingle_AppleDouble.pdf"> file.
|
url="https://nulib.com/library/AppleSingle_AppleDouble.pdf"> file.
|
||||||
The default load address is $803.
|
The default load address is $803.
|
||||||
|
|
||||||
<bf/AppleCommander 1.4.0/ or later (available at <url
|
<bf/AppleCommander 1.4.0/ or later (available at <url
|
||||||
@@ -281,7 +281,7 @@ AppleCommander option to put LOADER.SYSTEM on a ProDOS 8 disk image is <tt/-p/.
|
|||||||
If the cc65 program can be successfully linked as system program using the linker
|
If the cc65 program can be successfully linked as system program using the linker
|
||||||
configuration <ref id="apple-sys-cfg" name="apple2enh-system.cfg">, but
|
configuration <ref id="apple-sys-cfg" name="apple2enh-system.cfg">, but
|
||||||
uses the heap either explicitly or implicitly (i.e. by loading a driver) then
|
uses the heap either explicitly or implicitly (i.e. by loading a driver) then
|
||||||
the memory from $800 to $2000 can be added to the heap by calling
|
the memory from $800 to $1FFF can be added to the heap by calling
|
||||||
<tt/_heapadd ((void *) 0x0800, 0x1800);/ at the beginning of <tt/main()/.
|
<tt/_heapadd ((void *) 0x0800, 0x1800);/ at the beginning of <tt/main()/.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ static void ParseAutoDecl (Declaration* Decl)
|
|||||||
** We abuse the Collection somewhat by using it to store line
|
** We abuse the Collection somewhat by using it to store line
|
||||||
** numbers.
|
** numbers.
|
||||||
*/
|
*/
|
||||||
CollReplace (&CurrentFunc->LocalsBlockStack, (void *)(long)GetCurrentLine (),
|
CollReplace (&CurrentFunc->LocalsBlockStack, (void *)(size_t)GetCurrentLine (),
|
||||||
CollCount (&CurrentFunc->LocalsBlockStack) - 1);
|
CollCount (&CurrentFunc->LocalsBlockStack) - 1);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ struct CodeEntry;
|
|||||||
typedef struct DefOrRef DefOrRef;
|
typedef struct DefOrRef DefOrRef;
|
||||||
struct DefOrRef {
|
struct DefOrRef {
|
||||||
unsigned Line;
|
unsigned Line;
|
||||||
long LocalsBlockId;
|
size_t LocalsBlockId;
|
||||||
unsigned Flags;
|
unsigned Flags;
|
||||||
int StackPtr;
|
int StackPtr;
|
||||||
unsigned Depth;
|
unsigned Depth;
|
||||||
|
|||||||
@@ -951,7 +951,7 @@ DefOrRef* AddDefOrRef (SymEntry* E, unsigned Flags)
|
|||||||
DOR = xmalloc (sizeof (DefOrRef));
|
DOR = xmalloc (sizeof (DefOrRef));
|
||||||
CollAppend (E->V.L.DefsOrRefs, DOR);
|
CollAppend (E->V.L.DefsOrRefs, DOR);
|
||||||
DOR->Line = GetCurrentLine ();
|
DOR->Line = GetCurrentLine ();
|
||||||
DOR->LocalsBlockId = (long)CollLast (&CurrentFunc->LocalsBlockStack);
|
DOR->LocalsBlockId = (size_t)CollLast (&CurrentFunc->LocalsBlockStack);
|
||||||
DOR->Flags = Flags;
|
DOR->Flags = Flags;
|
||||||
DOR->StackPtr = StackPtr;
|
DOR->StackPtr = StackPtr;
|
||||||
DOR->Depth = CollCount (&CurrentFunc->LocalsBlockStack);
|
DOR->Depth = CollCount (&CurrentFunc->LocalsBlockStack);
|
||||||
@@ -1013,9 +1013,9 @@ SymEntry* AddLabelSym (const char* Name, unsigned Flags)
|
|||||||
/* Are we jumping into a block with initalization of an object that
|
/* Are we jumping into a block with initalization of an object that
|
||||||
** has automatic storage duration? Let's emit a warning.
|
** has automatic storage duration? Let's emit a warning.
|
||||||
*/
|
*/
|
||||||
if ((long)CollLast (AIC) != DOR->LocalsBlockId &&
|
if ((size_t)CollLast (AIC) != DOR->LocalsBlockId &&
|
||||||
(CollCount (AIC) < DOR->Depth ||
|
(CollCount (AIC) < DOR->Depth ||
|
||||||
(long)CollAt (AIC, DOR->Depth - 1) != DOR->LocalsBlockId)) {
|
(size_t)CollAt (AIC, DOR->Depth - 1) != DOR->LocalsBlockId)) {
|
||||||
Warning ("Goto at line %d to label %s jumps into a block with "
|
Warning ("Goto at line %d to label %s jumps into a block with "
|
||||||
"initialization of an object that has automatic storage duration",
|
"initialization of an object that has automatic storage duration",
|
||||||
GetCurrentLine (), Name);
|
GetCurrentLine (), Name);
|
||||||
@@ -1044,9 +1044,9 @@ SymEntry* AddLabelSym (const char* Name, unsigned Flags)
|
|||||||
/* Are we jumping into a block with initalization of an object that
|
/* Are we jumping into a block with initalization of an object that
|
||||||
** has automatic storage duration? Let's emit a warning.
|
** has automatic storage duration? Let's emit a warning.
|
||||||
*/
|
*/
|
||||||
if ((long)CollLast (AIC) != DOR->LocalsBlockId &&
|
if ((size_t)CollLast (AIC) != DOR->LocalsBlockId &&
|
||||||
(CollCount (AIC) >= DOR->Depth ||
|
(CollCount (AIC) >= DOR->Depth ||
|
||||||
(long)CollLast (AIC) >= (long)DOR->Line))
|
(size_t)CollLast (AIC) >= (size_t)DOR->Line))
|
||||||
Warning ("Goto at line %d to label %s jumps into a block with "
|
Warning ("Goto at line %d to label %s jumps into a block with "
|
||||||
"initialization of an object that has automatic storage duration",
|
"initialization of an object that has automatic storage duration",
|
||||||
DOR->Line, Name);
|
DOR->Line, Name);
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ typedef struct DbgInfo DbgInfo;
|
|||||||
struct DbgInfo {
|
struct DbgInfo {
|
||||||
|
|
||||||
/* First we have all items in collections sorted by id. The ids are
|
/* First we have all items in collections sorted by id. The ids are
|
||||||
** continous, so an access by id is almost as cheap as an array access.
|
** continuous, so an access by id is almost as cheap as an array access.
|
||||||
** The collections are also used when the objects are deleted, so they're
|
** The collections are also used when the objects are deleted, so they're
|
||||||
** actually the ones that "own" the items.
|
** actually the ones that "own" the items.
|
||||||
*/
|
*/
|
||||||
@@ -680,7 +680,7 @@ static char* SB_StrDup (const StrBuf* B)
|
|||||||
static Collection* CollInit (Collection* C)
|
static Collection* CollInit (Collection* C)
|
||||||
/* Initialize a collection and return it. */
|
/* Initialize a collection and return it. */
|
||||||
{
|
{
|
||||||
/* Intialize the fields. */
|
/* Initialize the fields. */
|
||||||
C->Count = 0;
|
C->Count = 0;
|
||||||
C->Size = 0;
|
C->Size = 0;
|
||||||
C->Items = 0;
|
C->Items = 0;
|
||||||
@@ -1349,7 +1349,7 @@ static int CompareFileInfoByName (const void* L, const void* R)
|
|||||||
|
|
||||||
|
|
||||||
static LibInfo* NewLibInfo (const StrBuf* Name)
|
static LibInfo* NewLibInfo (const StrBuf* Name)
|
||||||
/* Create a new LibInfo struct, intialize and return it */
|
/* Create a new LibInfo struct, initialize and return it */
|
||||||
{
|
{
|
||||||
/* Allocate memory */
|
/* Allocate memory */
|
||||||
LibInfo* L = xmalloc (sizeof (LibInfo) + SB_GetLen (Name));
|
LibInfo* L = xmalloc (sizeof (LibInfo) + SB_GetLen (Name));
|
||||||
@@ -1463,7 +1463,7 @@ static int CompareLineInfoByLine (const void* L, const void* R)
|
|||||||
|
|
||||||
|
|
||||||
static ModInfo* NewModInfo (const StrBuf* Name)
|
static ModInfo* NewModInfo (const StrBuf* Name)
|
||||||
/* Create a new ModInfo struct, intialize and return it */
|
/* Create a new ModInfo struct, initialize and return it */
|
||||||
{
|
{
|
||||||
/* Allocate memory */
|
/* Allocate memory */
|
||||||
ModInfo* M = xmalloc (sizeof (ModInfo) + SB_GetLen (Name));
|
ModInfo* M = xmalloc (sizeof (ModInfo) + SB_GetLen (Name));
|
||||||
@@ -1536,7 +1536,7 @@ static int CompareModInfoByName (const void* L, const void* R)
|
|||||||
|
|
||||||
|
|
||||||
static ScopeInfo* NewScopeInfo (const StrBuf* Name)
|
static ScopeInfo* NewScopeInfo (const StrBuf* Name)
|
||||||
/* Create a new ScopeInfo struct, intialize and return it */
|
/* Create a new ScopeInfo struct, initialize and return it */
|
||||||
{
|
{
|
||||||
/* Allocate memory */
|
/* Allocate memory */
|
||||||
ScopeInfo* S = xmalloc (sizeof (ScopeInfo) + SB_GetLen (Name));
|
ScopeInfo* S = xmalloc (sizeof (ScopeInfo) + SB_GetLen (Name));
|
||||||
@@ -1697,7 +1697,7 @@ static int CompareSegInfoByName (const void* L, const void* R)
|
|||||||
|
|
||||||
|
|
||||||
static SpanInfo* NewSpanInfo (void)
|
static SpanInfo* NewSpanInfo (void)
|
||||||
/* Create a new SpanInfo struct, intialize and return it */
|
/* Create a new SpanInfo struct, initialize and return it */
|
||||||
{
|
{
|
||||||
/* Allocate memory */
|
/* Allocate memory */
|
||||||
SpanInfo* S = xmalloc (sizeof (SpanInfo));
|
SpanInfo* S = xmalloc (sizeof (SpanInfo));
|
||||||
@@ -1779,7 +1779,7 @@ static int CompareSpanInfoByAddr (const void* L, const void* R)
|
|||||||
|
|
||||||
|
|
||||||
static SymInfo* NewSymInfo (const StrBuf* Name)
|
static SymInfo* NewSymInfo (const StrBuf* Name)
|
||||||
/* Create a new SymInfo struct, intialize and return it */
|
/* Create a new SymInfo struct, initialize and return it */
|
||||||
{
|
{
|
||||||
/* Allocate memory */
|
/* Allocate memory */
|
||||||
SymInfo* S = xmalloc (sizeof (SymInfo) + SB_GetLen (Name));
|
SymInfo* S = xmalloc (sizeof (SymInfo) + SB_GetLen (Name));
|
||||||
@@ -2147,7 +2147,7 @@ static TypeInfo* ParseTypeString (InputData* D, StrBuf* Type)
|
|||||||
I += GT_GET_SIZE (A[I]) + 1;
|
I += GT_GET_SIZE (A[I]) + 1;
|
||||||
} else {
|
} else {
|
||||||
/* Unknown type in type string */
|
/* Unknown type in type string */
|
||||||
ParseError (D, CC65_ERROR, "Unkown type in type value");
|
ParseError (D, CC65_ERROR, "Unknown type in type value");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -2733,7 +2733,7 @@ static int StrConstFollows (InputData* D)
|
|||||||
|
|
||||||
|
|
||||||
static int Consume (InputData* D, Token Tok, const char* Name)
|
static int Consume (InputData* D, Token Tok, const char* Name)
|
||||||
/* Check for a token and consume it. Return true if the token was comsumed,
|
/* Check for a token and consume it. Return true if the token was consumed,
|
||||||
** return false otherwise.
|
** return false otherwise.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
@@ -6936,7 +6936,7 @@ const cc65_scopeinfo* cc65_scope_byspan (cc65_dbginfo Handle, unsigned SpanId)
|
|||||||
const cc65_scopeinfo* cc65_childscopes_byid (cc65_dbginfo Handle, unsigned Id)
|
const cc65_scopeinfo* cc65_childscopes_byid (cc65_dbginfo Handle, unsigned Id)
|
||||||
/* Return the direct child scopes of a scope with a given id. The function
|
/* Return the direct child scopes of a scope with a given id. The function
|
||||||
** returns NULL if no scope with this id was found, otherwise a list of the
|
** returns NULL if no scope with this id was found, otherwise a list of the
|
||||||
** direct childs.
|
** direct children.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
const DbgInfo* Info;
|
const DbgInfo* Info;
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ static void StrVal (void)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
CfgWarning (&CfgErrorPos,
|
CfgWarning (&CfgErrorPos,
|
||||||
"Unkown escape sequence '%%%c'", C);
|
"Unknown escape sequence '%%%c'", C);
|
||||||
SB_AppendChar (&CfgSVal, '%');
|
SB_AppendChar (&CfgSVal, '%');
|
||||||
SB_AppendChar (&CfgSVal, C);
|
SB_AppendChar (&CfgSVal, C);
|
||||||
NextChar ();
|
NextChar ();
|
||||||
|
|||||||
Reference in New Issue
Block a user