Comments (5)
from: Paulo Custodio [email protected]
to: "alvin ([email protected])" [email protected]
cc: z88dk dev [email protected]
date: Sun, Oct 23, 2016 at 4:51 PM
The line you refer was recently introduced to support the consolidated object file; the -o option for naming the binary is used to name the consolidated object, which is produced at the link phase by reading all the object files from the input assembly files.
As z80asm does process a list of asm files in one go, e.g. to link a binary or build a library, the object file has to be determined from the source name.
The problem you mention: could it be solved by passing an extra -I option to z80asm with the original source directory of the source?
from z88dk.
from: alvin ([email protected]) [email protected] via lists.sourceforge.net
to: [email protected]
date: Sun, Oct 23, 2016 at 11:21 PM
Line 39 of options_def.h hints that this was considered but never implemented:
OPT_VAR( char , consol_obj_file, NULL) / set by -o and no -b */
The line you refer was recently introduced to support the consolidated object file; the -o option for naming the binary is used to name the consolidated object, which is produced at the link phase by reading all the object files from the input assembly files.
As z80asm does process a list of asm files in one go, e.g. to link a binary or build a library, the object file has to be determined from the source name.
Another possibility is to distinguish between two cases: if there is only one source file use the output filename. If there are many source files, ignore the output filename. Except for the consolidated object, libraries and binaries which are intended to combine many files into one.
The problem you mention: could it be solved by passing an extra -I option to z80asm with the original source directory of the source?
For now, zcc is copying .asm files to the temp dir before assembling so the .o is created in the temp dir. The include path will not resolve properly if the .asm file was not originally sitting in the cwd but nobody's complained about this in the last decade at least :P
But yes that can be done. There is a second issue with this where we've already created the include path string that is properly sequenced in the order the user wants. So adding a new include path at the point of assembling won't necessarily honour that sequence without some other changes.
from z88dk.
The suggested solution was applied in zcc, that is the user's asm file is copied to the temp directory and then is assembled to object file with the path to the original location added at the end of z80asm's include path list.
But as you say, this may mess with the user's intended path search order.
from z88dk.
The current z80asm also has already this solution in place: the directory of the main assembly file, i.e. the one mentioned in the command line, is appended to the end of include path before parsing the file and removed afterwards. This allows relative include paths out-of-the-box.
from z88dk.
Issue solved with the introduction of consolidated object files:
z88dk-z80asm -Otest.dir -ozcc0000.o test.asm
-Otest.dir creates all object files in that directory.
-ozcc0000.o creates a consolidated object file containing the test.o object also in the test.dir directory.
from z88dk.
Related Issues (20)
- fwrite hangs depending on buffer size. HOT 5
- Declaring prototype for interrupt handler breaks the handler
- (z80asm) Parse1.c compilation issue for m68k HOT 1
- Far memory support for MSX HOT 11
- [appmake][c128] Capital/Small generated file names HOT 12
- [snap][bug?] How to install the latest z88dk under Ubuntu 21.10? HOT 4
- Compiler and linker hints mess with Eclipse and probably other IDEs HOT 5
- [feature request][devcontainer] No install option HOT 3
- Docker images should be tagged HOT 10
- (z80asm) test fails in SNAPcraft HOT 1
- Merging the lib3d.lib into gfx HOT 16
- Support Tandy-Emeritus
- (z80asm) Pseudo instructions causing trouble HOT 3
- (sccz80) Const initialisation issue HOT 1
- 2.2 does not compile on Fedora 40 HOT 4
- [question] How is z88dk making it possible to parallely build several targets sharing some code? HOT 3
- [bug?] Z88DK versions from the same date: Linux version fails while Windows version is OK HOT 5
- [bug][zx81][wrx] When compiling for zx81 with wrx I now get `undefined symbol: hrg_phase` HOT 7
- Thank you 🙂
- msys2 issues: clang64 error compiling and compiler path errors HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from z88dk.