1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-01 13:41:34 +00:00

Merge branch 'cc65:master' into master

This commit is contained in:
polluks2 2021-12-14 09:19:17 +01:00 committed by GitHub
commit 89909cd4ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 177 additions and 22 deletions

View 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

View 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

View File

@ -4,6 +4,8 @@
[Wiki](https://github.com/cc65/wiki/wiki)
[![Snapshot Build](https://github.com/cc65/cc65/actions/workflows/snapshot-on-push-master.yml/badge.svg?branch=master)](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
a powerful macro assembler, a C compiler, linker, librarian and several
other tools.

View File

@ -33,7 +33,7 @@ more information.
The standard binary file format generated by the linker for the
Apple&nbsp;&rsqb;&lsqb; 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 &dollar;803.
<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
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
the memory from &dollar;800 to &dollar;2000 can be added to the heap by calling
the memory from &dollar;800 to &dollar;1FFF can be added to the heap by calling
<tt/_heapadd ((void *) 0x0800, 0x1800);/ at the beginning of <tt/main()/.

View File

@ -33,7 +33,7 @@ more information.
The standard binary file format generated by the linker for the
enhanced&nbsp;Apple&nbsp;//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 &dollar;803.
<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
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
the memory from &dollar;800 to &dollar;2000 can be added to the heap by calling
the memory from &dollar;800 to &dollar;1FFF can be added to the heap by calling
<tt/_heapadd ((void *) 0x0800, 0x1800);/ at the beginning of <tt/main()/.

View File

@ -286,7 +286,7 @@ static void ParseAutoDecl (Declaration* Decl)
** We abuse the Collection somewhat by using it to store line
** numbers.
*/
CollReplace (&CurrentFunc->LocalsBlockStack, (void *)(long)GetCurrentLine (),
CollReplace (&CurrentFunc->LocalsBlockStack, (void *)(size_t)GetCurrentLine (),
CollCount (&CurrentFunc->LocalsBlockStack) - 1);
} else {

View File

@ -115,7 +115,7 @@ struct CodeEntry;
typedef struct DefOrRef DefOrRef;
struct DefOrRef {
unsigned Line;
long LocalsBlockId;
size_t LocalsBlockId;
unsigned Flags;
int StackPtr;
unsigned Depth;

View File

@ -951,7 +951,7 @@ DefOrRef* AddDefOrRef (SymEntry* E, unsigned Flags)
DOR = xmalloc (sizeof (DefOrRef));
CollAppend (E->V.L.DefsOrRefs, DOR);
DOR->Line = GetCurrentLine ();
DOR->LocalsBlockId = (long)CollLast (&CurrentFunc->LocalsBlockStack);
DOR->LocalsBlockId = (size_t)CollLast (&CurrentFunc->LocalsBlockStack);
DOR->Flags = Flags;
DOR->StackPtr = StackPtr;
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
** 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 ||
(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 "
"initialization of an object that has automatic storage duration",
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
** 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 ||
(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 "
"initialization of an object that has automatic storage duration",
DOR->Line, Name);

View File

@ -183,7 +183,7 @@ typedef struct DbgInfo DbgInfo;
struct DbgInfo {
/* 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
** actually the ones that "own" the items.
*/
@ -680,7 +680,7 @@ static char* SB_StrDup (const StrBuf* B)
static Collection* CollInit (Collection* C)
/* Initialize a collection and return it. */
{
/* Intialize the fields. */
/* Initialize the fields. */
C->Count = 0;
C->Size = 0;
C->Items = 0;
@ -1349,7 +1349,7 @@ static int CompareFileInfoByName (const void* L, const void* R)
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 */
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)
/* Create a new ModInfo struct, intialize and return it */
/* Create a new ModInfo struct, initialize and return it */
{
/* Allocate memory */
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)
/* Create a new ScopeInfo struct, intialize and return it */
/* Create a new ScopeInfo struct, initialize and return it */
{
/* Allocate memory */
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)
/* Create a new SpanInfo struct, intialize and return it */
/* Create a new SpanInfo struct, initialize and return it */
{
/* Allocate memory */
SpanInfo* S = xmalloc (sizeof (SpanInfo));
@ -1779,7 +1779,7 @@ static int CompareSpanInfoByAddr (const void* L, const void* R)
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 */
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;
} else {
/* 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;
}
break;
@ -2733,7 +2733,7 @@ static int StrConstFollows (InputData* D)
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.
*/
{
@ -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)
/* 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
** direct childs.
** direct children.
*/
{
const DbgInfo* Info;

View File

@ -196,7 +196,7 @@ static void StrVal (void)
default:
CfgWarning (&CfgErrorPos,
"Unkown escape sequence '%%%c'", C);
"Unknown escape sequence '%%%c'", C);
SB_AppendChar (&CfgSVal, '%');
SB_AppendChar (&CfgSVal, C);
NextChar ();