Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved building via CMake #184

Merged
merged 26 commits into from
Sep 1, 2019
Merged

Improved building via CMake #184

merged 26 commits into from
Sep 1, 2019

Conversation

Neui
Copy link
Contributor

@Neui Neui commented Jun 27, 2018

This does somewhat a lot of stuff, mostly taken from #164:

  • Generally cleaner and consistent CMakeLists.txts
  • Now using a list of architectures(/CPUs) rather than "hardcoding" the things, so now a loop can be used.
  • Cross-compiling support, including basic support for "crosscompiling-emulators" (e. g. wine)
  • CPack support
  • Opcode generator now accepts an optional argument for the output file
  • Opcode generator has been moved to the root directory because it is just one file and makes possible to use the output as a source file. (You cant specify generated source files from other directories in CMake for some reason)
    • The create_tables.bat also has been removed as a side effect. @cr1901 is probably going to complain about this.
  • User code now explicitly refers the generated opcode table via a extern variable. I am not so sure if this is going to work on amiga (because of the _far thing).
  • Define NDEBUG now also controls the debugging defines for wla and wlalink since NDEBUG is basically in the C standard (for assert)

Please review (and test) before merging. Complains allowed.

@vhelin
Copy link
Owner

vhelin commented Jul 1, 2018

Personally I don't know anything about CMake, so if people have nothing against this merge, I'll apply it. :)

@Neui
Copy link
Contributor Author

Neui commented Jul 2, 2018

I am mostly worried about amiga and legacy building, since the opcode generation files has been moved to the root directory and is now used as a file that is compiled with rather than being #include d.

@Neui Neui mentioned this pull request Aug 24, 2018
7 tasks
@Neui Neui force-pushed the better-cmake branch 4 times, most recently from 1fcc65d to 5812dee Compare September 29, 2018 17:00
@Neui
Copy link
Contributor Author

Neui commented Sep 29, 2018

Anything new? I just rebased and tested it (on Ubuntu). I think the cmake 'code' I've written is understandable enough. See the "files changed" link above the first post if you like to see all the changes in one diff.

@vhelin
Copy link
Owner

vhelin commented Sep 30, 2018

I am mostly worried about amiga and legacy building, since the opcode generation files has been moved to the root directory and is now used as a file that is compiled with rather than being #include d.

Also, the changes to WLA's main.c might make it not to compile on Amiga?

@vhelin
Copy link
Owner

vhelin commented Sep 30, 2018 via email

@Neui
Copy link
Contributor Author

Neui commented Sep 30, 2018

Also, the changes to WLA's main.c might make it not to compile on Amiga?

Well not with the old build files. I've tried to create "legacy makefiles" (in an another branch), which I tried to base off some things from the makefiles from amiga (which used gcc to my surprise, so no real changes was needed), but since I don't have an amiga machine, I can't test it. Maybe cross compilation is an option.

@cr1901
Copy link
Collaborator

cr1901 commented Sep 30, 2018

I'm ok with this, even though WLA might not compile on
Amiga any more, but then again is Amiga support worth keeping in 2018? :)

My personal opinion is that there are vendor tools (Deluxe Paint, anyone?) for Amiga, DOS, and friends that are still usable for old consoles and for whom support will probably never be modernized. Having access to WLA-DX old machines is still valuable IMO.

That said, I don't have an Amiga and can't test the old scripts. cmake will never run on Amiga or DOS (and it's not possible to run cmake-generated build scripts on anywhere except the host).

Maybe cross compilation is an option.

This is also possible, provided an Amiga 3.x compiler exists on Windows/wherever.

@vhelin
Copy link
Owner

vhelin commented Sep 30, 2018 via email

@cr1901
Copy link
Collaborator

cr1901 commented Sep 30, 2018

It's your codebase, feel free to drop Amiga support :). I would still like the code to remain portable when possible, however (in other words, not tied to a specific compiler).

@Neui This means I still want the -ansi flag to gcc, which you removed here: 4b83e3f#diff-af3b638bc2a3e6c650974192a53c7291L42

@Neui
Copy link
Contributor Author

Neui commented Sep 30, 2018

Note that existing makefiles in the historical folder would break. Also, you can't build on (Free)DOS anyway due to 8.3 name restriction, but you probably can cross-compile to it.

In the case of amiga, there is a special table marked as __far followed by a table that is being #include d. The change is that this __far has been commented out in favour of just saying there is an table with that variable name (extern int opcode_n[256];) and the actual table is compiled separately and linked together by the linker. (Think like doing gcc main.c opcode_table.c rather than just gcc main.c with main.c including opcode_table.c) I've done this to make the source file less depended on those big #if #elif chains.

What I am unsure is if missing this __far would break support for it. Testing would say it, but, as I said, have no machine to test. Since it seems you can use gcc on amiga (from what I've seen in the historical makefiles for amiga), you probably can use a generated makefile to test. (I've a branch legacy-mkfiles where I tried to create a makefile generator that generates one makefile for a configuration without creating many files for e. g. each system)

@vhelin
Copy link
Owner

vhelin commented Sep 30, 2018 via email

@cr1901
Copy link
Collaborator

cr1901 commented Sep 30, 2018

I think that that should still work, but does the string joining you have
now in main.c work with the ancient Amiga GCC compiler?

C89 mandates that string concatenation works, so even an ancient GCC almost certainly supports it.

@vhelin
Copy link
Owner

vhelin commented Sep 30, 2018 via email

@cr1901
Copy link
Collaborator

cr1901 commented Sep 30, 2018

Well that is good news. Does this mean that this pull request could work on
Amiga GCC? Man I wish I had the energy to setup WinUAE with gcc etc...

If you have a cross compiler for it as well as the system libraries, I don't see why not :). Of course that would be a lot of work, but in principle it can be done. Amiga 3.x support would be gone I assume though (using smake and friends).

@Neui
Copy link
Contributor Author

Neui commented Oct 7, 2018

So.. what now?

@cr1901

@Neui This means I still want the -ansi flag to gcc, which you removed here: 4b83e3f#diff-af3b638bc2a3e6c650974192a53c7291L42

Sorry, I didn't saw the edit until now. From the GCC documentation, -ansi is the same as -std=c89. I am using -std=c90, which I think should be identical, but I haven't tested with such old gcc version. CMake allows you to set the C Standard (so it can set it independently of the compiler), but the minimum it "supports" is 90.

If you want, I can set it explicitly to c89 for gcc.

Edit: I found https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20631, where it seems -std=c90 was introduced in gcc 4.5. I think your answer would be "yes".

Edit2: In CMakes code, it seems it automatically adjusts for that, so I going to change it to c89.

@Neui Neui force-pushed the better-cmake branch 2 times, most recently from b0bd04e to 574f0af Compare October 12, 2018 18:32
@Neui Neui force-pushed the better-cmake branch 2 times, most recently from 4bf67ae to 23febfc Compare October 31, 2018 14:14
@Neui
Copy link
Contributor Author

Neui commented Oct 31, 2018

Rebased on current master so it can be merged without any conflicts. Note that the compatibility for old makefiles already has been broken by at least since PR #202 since it introduced a new file you would need to compile (crc32.c).

I've also forced CMake to use -ansi now rather than -std=c89, just in case.

@vhelin
Copy link
Owner

vhelin commented Nov 1, 2018 via email

@cr1901
Copy link
Collaborator

cr1901 commented Nov 2, 2018

FYI, I just updated the historical makefiles to compile crc32.c.

Tyvm Ville :). Right now I've been doing time-sensitive work, but soon I'll set up an Amiga emulator of some sorts and see if the historical Makefiles still work. Ya know, just for fun :P.

@vhelin
Copy link
Owner

vhelin commented Aug 20, 2019

What's the status of this pull request? I know nothing about CMake so I cannot evaluate what has been done... @cr1901, can you review this? Anyone else?

This pull request has been here for quite a while and I'd like to merge it soon if possible...

@Neui
Copy link
Contributor Author

Neui commented Aug 20, 2019

What's the status of this pull request?

As I've written before:

This PR has been in progress for over a year. Do you have an ETA when it might be ready to merge so I can look into Travis CI

It doesn't have the [WIP] tag, so this is mergable. Its just that I did some changes to the old historical make files (for amiga) that needs to be tested (that I can't because I don't have an amiga).

I know nothing about CMake so I cannot evaluate what has been done...

Maybe you could try to read them, it's a bit like a programming/scripting language. Basically this PR cleans up some stuff and uses a loop in order to build each flavor. The biggest change is that rather than #includeing an .c file in various places it now builds them "separately".

@vhelin
Copy link
Owner

vhelin commented Aug 22, 2019

I went through the changes, couldn't understand all the CMake stuff, but at least I did understand the changes in C code. :) Here are some notes (looking at this: https://github.com/vhelin/wla-dx/pull/184/files)

  • set(CMAKE_C_STANDARD 90) -> Shouldn't this be actually 89?
  • set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
    "Yet Another GB-Z80/Z80/6502/65C02/6510/65816/HUC6280/SPC-700 Multi Platform Cross Assembler Package") -> This description is out of date. And where is it used?
  • #define WLA_NAME "huc6280" -> HuC6280?
  • historical/amiga is pretty broken. Please check through things like these again: :)

sc define AMIGA=1 define MC6801=1 main.c
sc define AMIGA=1 define MC6809=1 opcodes_6801.c
slink FROM LIB:c.o main.o TO opcode_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
opcode_table_generator
delete opcode_table_generator main.o opcodes_8601.o

  • historical/makefiles/makefile.amiga.6510 -> Contains references to 65816...
  • historical/makefiles/makefile.msdos.6800 -> Contains references to 8600...
  • historical/makefiles/makefile.msdos.6801 -> Contains references to 8600...
  • historical/makefiles/makefile.msdos.6809 -> Contains references to 8600...
  • in pass_1.c the /__far / ... can be taken away after my latest changes to amiga scoptions.0?0 files.

That's it, I hope I caught all the bugs...

@Neui
Copy link
Contributor Author

Neui commented Aug 22, 2019

Thank you for reviewing!

  • set(CMAKE_C_STANDARD 90) -> Shouldn't this be actually 89?

C90 and C89 are the same. CMake only just accepts 90.

  • set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
    "Yet Another GB-Z80/Z80/6502/65C02/6510/65816/HUC6280/SPC-700 Multi Platform Cross Assembler Package") -> This description is out of date. And where is it used?

Good catch. Not sure where the description is exactly used, I'll have to try building it and look where it is being displayed. The documentation doesn't really say anything about it. It's more of an convenient packager that musn't be used. Also, it possibly can be automated (aka generate the "GB-Z80/Z80/6502/65C02/6510/65816/HUC6280/SPC-700" string using the list at the beginning of the CMakeLists, but not for now)

  • #define WLA_NAME "huc6280" -> HuC6280?

WLA_NAME was intended to be the name used in the binary name (like wla-huc6280), but currently it is only used for version printing as far as I can see, so I can change that if you want. (Along with spc700 → SPC700)

  • historical/amiga is pretty broken. Please check through things like these again: :)

sc define AMIGA=1 define MC6801=1 main.c
sc define AMIGA=1 define MC6809=1 opcodes_6801.c
slink FROM LIB:c.o main.o TO opcode_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
opcode_table_generator
delete opcode_table_generator main.o opcodes_8601.o

  • historical/makefiles/makefile.amiga.6510 -> Contains references to 65816...
  • historical/makefiles/makefile.msdos.6800 -> Contains references to 8600...
  • historical/makefiles/makefile.msdos.6801 -> Contains references to 8600...
  • historical/makefiles/makefile.msdos.6809 -> Contains references to 8600...

Good find. Why is there so much copy-paste... Also, I noticed that I don't link the (for example) opcodes_6801.o file for the opcode_table_generator. Also, the opcodes_ files are one directory lower, so I used an /, but I am not sure whenever the compiler produces files in the current working directory (the opcode_table_generator in this case) or where the file is located. If it's the latter, then it needs to be changed.

  • in pass_1.c the /__far / ... can be taken away after my latest changes to amiga scoptions.0?0 files.

Ok, I removed it.

That's it, I hope I caught all the bugs...

Thank you! Did you test it on an amiga system?

By the way, on the page you looked the changes at also has a "Review Changes" button, where you can Approve/Request changes etc. Never used it, but you could look into it. Also, when hovering over a line, there is a + symbol where you can add a comment to the specified line.

@vhelin
Copy link
Owner

vhelin commented Aug 22, 2019

  • set(CMAKE_C_STANDARD 90) -> Shouldn't this be actually 89?

C90 and C89 are the same. CMake only just accepts 90.

Ok!

  • #define WLA_NAME "huc6280" -> HuC6280?

WLA_NAME was intended to be the name used in the binary name (like wla-huc6280), but currently it is only used for version printing as far as I can see, so I can change that if you want. (Along with spc700 → SPC700)

Ah, ok, no need to change that, my bad.

Thank you! Did you test it on an amiga system?

Not yet. When I did the review I wasn't at home, could just read through the changes... Thanks for the fixes! I'll try to test run this on an Amiga later this week and will report back the results.

By the way, on the page you looked the changes at also has a "Review Changes" button, where you can Approve/Request changes etc. Never used it, but you could look into it. Also, when hovering over a line, there is a + symbol where you can add a comment to the specified line.

Oh, that's cool! I'll try to use those features in the future. :)

historical/amiga Outdated Show resolved Hide resolved
Neui added 2 commits August 23, 2019 11:26
* Some files referenced wrong files because of copy-pasting mistakes
* The opcodes_x.c is now also linked with the opcode table generator
  Note that this assumes the object file is generated in the current
  directory.
* Removed __far in pass_1.c because it isn't needed anymore
defines.h Outdated Show resolved Hide resolved
defines.h Outdated Show resolved Hide resolved
defines.h Outdated Show resolved Hide resolved
@vhelin
Copy link
Owner

vhelin commented Aug 25, 2019

Encountered some errors while testing this on an Amiga:

  1. Make historical/amiga to begin with this (problem with a #include without "/" plus a typo fix)

...

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; OPCODE TABLE GENERATOR
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

copy makefiles/scoptions.000 to scoptions
sc define AMIGA=1 define GB=1 opcodes_gb.c
sc define AMIGA=1 define Z80=1 opcodes_z80.c
sc define AMIGA=1 define MCS6502=1 opcodes_6502.c
sc define AMIGA=1 define WDC65C02=1 opcodes_65c02.c
sc define AMIGA=1 define MC6800=1 opcodes_6800.c
sc define AMIGA=1 define MC6801=1 opcodes_6801.c
sc define AMIGA=1 define MC6809=1 opcodes_6809.c
sc define AMIGA=1 define I8008=1 opcodes_8008.c
sc define AMIGA=1 define MCS6510=1 opcodes_6510.c
sc define AMIGA=1 define W65816=1 opcodes_65816.c
sc define AMIGA=1 define SPC700=1 opcodes_spc700.c
sc define AMIGA=1 define HUC6280=1 opcodes_huc6280.c

copy makefiles/scoptions.000 to opcode_table_generator/scoptions
cd opcode_table_generator

sc define AMIGA=1 define GB=1 main.c
slink FROM LIB:c.o main.o /opcodes_gb.o TO opcode_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
opcode_table_generator /opcodes_gb_tables.c
delete opcode_table_generator main.o /opcodes_gb.o

sc define AMIGA=1 define Z80=1 main.c
slink FROM LIB:c.o main.o /opcodes_z80.o TO opcode_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
opcode_table_generator /opcodes_z80_tables.c
delete opcode_table_generator main.o /opcodes_z80.o

sc define AMIGA=1 define MCS6502=1 main.c
slink FROM LIB:c.o main.o /opcodes_6502.o TO opcode_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
opcode_table_generator /opcodes_6502_tables.c
delete opcode_table_generator main.o /opcodes_6502.o

sc define AMIGA=1 define WDC65C02=1 main.c
slink FROM LIB:c.o main.o /opcodes_65c02.o TO opcode_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
opcode_table_generator /opcodes_65c02_tables.c
delete opcode_table_generator main.o /opcodes_65c02.o

sc define AMIGA=1 define MC6800=1 main.c
slink FROM LIB:c.o main.o /opcodes_6800.o TO opcode_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
opcode_table_generator /opcodes_6800_tables.c
delete opcode_table_generator main.o /opcodes_6800.o

sc define AMIGA=1 define MC6801=1 main.c
slink FROM LIB:c.o main.o /opcodes_6801.o TO opcode_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
opcode_table_generator /opcodes_6801_tables.c
delete opcode_table_generator main.o /opcodes_6801.o

sc define AMIGA=1 define MC6809=1 main.c
slink FROM LIB:c.o main.o /opcodes_6809.o TO opcode_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
opcode_table_generator /opcodes_6809_tables.c
delete opcode_table_generator main.o /opcodes_6809.o

sc define AMIGA=1 define I8008=1 main.c
slink FROM LIB:c.o main.o /opcodes_8008.o TO opcode_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
opcode_table_generator /opcodes_8008_tables.c
delete opcode_table_generator main.o /opcodes_8008.o

sc define AMIGA=1 define MCS6510=1 main.c
slink FROM LIB:c.o main.o /opcodes_6510.o TO opcode_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
opcode_table_generator /opcodes_6510_tables.c
delete opcode_table_generator main.o /opcodes_6510.o

sc define AMIGA=1 define W65816=1 main.c
slink FROM LIB:c.o main.o /opcodes_65816.o TO opcode_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
opcode_table_generator /opcodes_65816_tables.c
delete opcode_table_generator main.o /opcodes_65816.o

sc define AMIGA=1 define SPC700=1 main.c
slink FROM LIB:c.o main.o /opcodes_spc700.o TO opcode_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
opcode_table_generator /opcodes_spc700_tables.c
delete opcode_table_generator main.o /opcodes_spc700.o

sc define AMIGA=1 define HUC6280=1 main.c
slink FROM LIB:c.o main.o /opcodes_huc6280.o TO opcode_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
opcode_table_generator /opcodes_huc6280_tables.c
delete opcode_table_generator main.o /opcodes_huc6280.o

cd /

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WLA-GB
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

...

  1. Replace WLAFLAGS with CFLAGS in smake.6800, smake.6801, smake.6809 and smake.8008 under historical/makefiles

-> After these fixes it should work out-of-the-box on an Amiga.

@cr1901
Copy link
Collaborator

cr1901 commented Aug 25, 2019

@vhelin When this PR is finally merged, I can look into trying to get CI builds on Amiga. It will clearly require an emulator that's command-line/headless friendly, and someone access to Amiga ROMs ($$), so Idk how feasible it is. But maybe worth a try?

@vhelin
Copy link
Owner

vhelin commented Aug 25, 2019

@vhelin When this PR is finally merged, I can look into trying to get CI builds on Amiga. It will clearly require an emulator that's command-line/headless friendly, and someone access to Amiga ROMs ($$), so Idk how feasible it is. But maybe worth a try?

I bet that if you use the latest WinUAE it'll work just fine. It's a great emulator! :)

* "rewrite" of the beginning of historical/amiga by vhelin
* Use CFLAGS in smake.* instead of WLAFLAGS
@Neui
Copy link
Contributor Author

Neui commented Aug 25, 2019

Encountered some errors while testing this on an Amiga:

  1. Make historical/amiga to begin with this (problem with a #include without "/" plus a typo fix)

Ok, I replaced it. Thank you!

  1. Replace WLAFLAGS with CFLAGS in smake.6800, smake.6801, smake.6809 and smake.8008 under historical/makefiles

I also did it, but there weren't any WLAFLAGS in smake.8008.

About the amiga building, putting it on an "online" instance might be problematic, so maybe keep a private machine. However then there is still the problem of automation. (Maybe some sort of serial connection?)

@vhelin
Copy link
Owner

vhelin commented Aug 25, 2019

Now it works on an Amiga! SAS/C complains about int opcode_n[] being defined both in pass_1.c and corresponding "opcodes_*_tables.c", but I don't understand how that is possible now that "opcodes*__tables.c" is not included in pass_1.c any more. Any ideas about that? Anyway, SAS/C survives the double declaration and can compile and link the executables.

???

@Neui
Copy link
Contributor Author

Neui commented Aug 25, 2019

I see that on line 126 in pass_1.c also has an int opcode_n[256] line (the extern version is some lines below it), which could be the cause. Can you try remove the one at line 126?

@vhelin
Copy link
Owner

vhelin commented Aug 26, 2019

I see that on line 126 in pass_1.c also has an int opcode_n[256] line (the extern version is some lines below it), which could be the cause. Can you try remove the one at line 126?

Haha, oh yes. :) I was just looking for #include's... I'm pretty sure that's it! I'll try to remove the declarations when I get home later today evening and see if the (non-fatal) error goes away.

@vhelin
Copy link
Owner

vhelin commented Aug 26, 2019

  1. Replace WLAFLAGS with CFLAGS in smake.6800, smake.6801, smake.6809 and smake.8008 under historical/makefiles

I also did it, but there weren't any WLAFLAGS in smake.8008.

Ah, sorry about that. I just had too many files open in Notepad++ and perhaps looked inside wrong tabs...

About the amiga building, putting it on an "online" instance might be problematic, so maybe keep a private machine. However then there is still the problem of automation. (Maybe some sort of serial connection?)

I think setting this one up would take quite a lot of time and might not be really that useful in the long run. At least I don't have the space on my desk to keep an Amiga permanently there next to my monitor... Setting up WinUAE emulation might be a better solution as it doesn't take any space on the table and can be configured to be pretty fast. :)

I mean I can deal with the extra work required to manually move files from my Windows PC to an Amiga once in a while when I want to test if WLA DX still compiles on it. Automating it would save something like 5-10 minutes per run, but I'm happier if I can store the Amiga away in the closet after my tests...

@cr1901
Copy link
Collaborator

cr1901 commented Aug 26, 2019

Setting up WinUAE emulation might be a better solution as it doesn't take any space on the table and can be configured to be pretty fast.

My issue with doing this myself is AFAIK the Amiga compilers and the OS (Kickstart ROMs) actually cost money to get, and I have neither (money or the images) :P.

@Neui
Copy link
Contributor Author

Neui commented Aug 26, 2019

  1. Replace WLAFLAGS with CFLAGS in smake.6800, smake.6801, smake.6809 and smake.8008 under historical/makefiles

I also did it, but there weren't any WLAFLAGS in smake.8008.

Ah, sorry about that. I just had too many files open in Notepad++ and perhaps looked inside wrong tabs...

No problem.

About the amiga building, putting it on an "online" instance might be problematic, so maybe keep a private machine. However then there is still the problem of automation. (Maybe some sort of serial connection?)

I think setting this one up would take quite a lot of time and might not be really that useful in the long run. At least I don't have the space on my desk to keep an Amiga permanently there next to my monitor... Setting up WinUAE emulation might be a better solution as it doesn't take any space on the table and can be configured to be pretty fast. :)

I mean I can deal with the extra work required to manually move files from my Windows PC to an Amiga once in a while when I want to test if WLA DX still compiles on it. Automating it would save something like 5-10 minutes per run, but I'm happier if I can store the Amiga away in the closet after my tests...

Well I don't mean an separate amiga machine but having a "modern" machine (or even your current one or one on the web) that does it (via emulation), and the serial was just an idea to communicate "easily" between the host and the amiga to transfer data and results (if possible, I don't really know).

@vhelin
Copy link
Owner

vhelin commented Aug 26, 2019

I see that on line 126 in pass_1.c also has an int opcode_n[256] line (the extern version is some lines below it), which could be the cause. Can you try remove the one at line 126?

Yep, you were right!

  • Remove the declarations on line 126 in pass_1.c
  • Make line 158 look like this: extern int opcode_n[256], opcode_p[256];

-> Compiles and links on Amiga without errors. Nice!

Previously, there were an extern and an non-extern declarations. While
it seems that gcc and clang doesn't care, SAS/C for amiga did
rightfully, and thus this is now fixed.
@cr1901
Copy link
Collaborator

cr1901 commented Aug 27, 2019

My issue with doing this myself is AFAIK the Amiga compilers and the OS (Kickstart ROMs) actually cost money to get, and I have neither (money or the images) :P.

@vhelin My subtext here is I want you to provide me with Kickstart ROMs, the Amiga OS, and the compilers if I set up Amiga CI, because I can't afford to buy them :P.

@vhelin
Copy link
Owner

vhelin commented Aug 29, 2019

My issue with doing this myself is AFAIK the Amiga compilers and the OS (Kickstart ROMs) actually cost money to get, and I have neither (money or the images) :P.

@vhelin My subtext here is I want you to provide me with Kickstart ROMs, the Amiga OS, and the compilers if I set up Amiga CI, because I can't afford to buy them :P.

I recommend that we'll forget that idea about CI and Amiga. :D It's not really worth it, and I can do the necessary builds (and tests) once in a while, when we feel like we need them. In another words: I guess not that often... The next good time to do it might be just before releasing WLA DX v9.10...

@vhelin vhelin merged commit a20ada0 into vhelin:master Sep 1, 2019
@vhelin
Copy link
Owner

vhelin commented Sep 1, 2019

Thanks for the hard work! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants