Commit graph

94 commits

Author SHA1 Message Date
Bill Currie
1cba65f6ce fix a gcc 2.95 warning 2002-11-04 02:24:28 +00:00
Bill Currie
7f69f593d3 configure.ac:
define default include and lib paths for qfcc
ruamoko:
	{cl_menu,game}/Makefile.am:
		conform to the new qfcc library linking rules
	lib/Makefile.am:
		install the libs to ${prefix}/lib/ruamoko
qfcc:
	linker.[ch]:
		support path searching for -llib and make linker_add_lib search for
		libfoo.a for -lfoo in the paths, or just a single dir search for the
		libname otherwise.
	options.c:
		support -L libpath and setup the default include and lib paths
		also change most strdup calls to save_string
	qfcc.c:
		check for foo.a as well as -lfoo when deciding whether the file is
		an object file or lib file.
2002-11-01 18:05:12 +00:00
Bill Currie
7af99f422f expr.c:
fix a braino that caused only sizeof expr to work
linker.c:
	print an error message if unable to open the lib
qc-parse.y:
	revamp expression parsing so casting is done via (type)expr rather than
	type(expr)
	make it so pointers to pointers don't need ()s
2002-10-31 22:58:59 +00:00
Bill Currie
9d8d570269 using Qseek on a pak sub-file should work better. this should make oggs in
paks work.
2002-09-27 04:27:19 +00:00
Bill Currie
d8a38ae648 don't fuss with function defs that aren't initialized 2002-09-19 06:01:06 +00:00
Bill Currie
ece9660099 get @system working (Closes: #52). I'm not happy with the name of this
operator and I'm very open to suggestions, but it seems to work. What
@system does is to mark a def in such a way that the linker will allow it
to be redefined /once/ giving the programmer control over where and when
a def is defined, but initializing it elsewhere. This is most useful when
working with v6 progs and separate compliation as the `system' defs need to
be in a certain order in certain locations or the resuting progs.dat file
will be incompatable with non-qf 0.5 servers.
2002-09-17 18:42:35 +00:00
Bill Currie
4a34960d95 a bit of code cleanup 2002-09-16 17:37:22 +00:00
Bill Currie
842a9d2eb0 linker.c:
don't seg on uninitialized fields
qc-parse.y:
	support @extern and @static blocks (eg, @extern { ... };)
2002-09-12 17:13:19 +00:00
Bill Currie
ec47e08e1c go back to using QFile, quakeio.h and quakefs.h 2002-08-27 07:16:28 +00:00
Bill Currie
36ca7b55bd fix several problems caused by insufficient error checking and some double
Qclose calls
2002-08-15 18:53:03 +00:00
Bill Currie
09ce2b0662 make sure a class' super class gets referenced when the class is implemented
to ensure the super class' object file gets linked in when it's in a library
2002-08-14 03:55:23 +00:00
Bill Currie
fabaf84745 fix a missing reloc ref for .this 2002-08-14 03:44:41 +00:00
Bill Currie
c2a7564d55 implement -l, but -L isn't supported yet and the full lib name must be given 2002-07-21 07:12:17 +00:00
Bill Currie
fb4ef47af6 make the filename output high verbosity 2002-07-17 19:00:16 +00:00
Bill Currie
8d6c491390 fix branches (been broken for a while :/) 2002-07-17 18:45:17 +00:00
Bill Currie
8a96b5bbbc oops, forgot to remove the debug print :) 2002-07-16 22:00:55 +00:00
Bill Currie
678a45cfe2 entity fields seem to work. I guess this means separate compilation is now
useful :)
2002-07-16 21:59:47 +00:00
Bill Currie
c36b7e36d2 fix external vectors and only complain about undefined externals that are
actually used
2002-07-16 20:09:14 +00:00
Bill Currie
ac1392eb74 object.r:
define __obj_exec_class, obj_msgSend and obj_msgSend_super for the way
	qfcc now handles these defs
pr_edict.c:
	PR_ValueString now checks that the function is valid before trying to
	print its name.
class.c:
	__obj_exec_class is now extern
linker.c:
	fix more mangled relocs
method.c:
	obj_msgSend and obj_msgSend_super are now extern
qfcc.c:
	fixes so obj_module_t doesn't get zapped
type.c:
	fixes so obj_module_t doesn't get zapped
2002-07-16 19:03:56 +00:00
Bill Currie
3b1825b692 fix the mangled relocs. oo hello world works again 2002-07-16 17:35:40 +00:00
Bill Currie
17c2def821 def merging seems to mostly work (have some problems with method lists) 2002-07-16 06:40:34 +00:00
Bill Currie
bf858856b8 fix a /really/ silly error that broke def relocations 2002-07-15 22:10:03 +00:00
Bill Currie
295a9c1115 move external defs from the external table to the global table when they
get defined
2002-07-15 21:49:46 +00:00
Bill Currie
463c5724db clean up some duplicated code by using some template macros 2002-07-15 21:45:32 +00:00
Bill Currie
b9a237b13d rename qfo_function_t to qfo_func_t and similar for other qfo *function* in
obj_file.[ch]
2002-07-15 21:37:52 +00:00
Bill Currie
8539d7987f make @self and @this work for separate compilation 2002-07-14 05:40:38 +00:00
Bill Currie
9b6980ac7b fix an off by one error that was mangling functions 2002-07-13 03:21:27 +00:00
Bill Currie
c6ad0ff819 fixup_relocs doesn't need qfo any more 2002-07-13 02:24:06 +00:00
Bill Currie
b48d71fdcc make qfo functions 0 based. now having weird def problems :/ 2002-07-12 22:27:40 +00:00
Bill Currie
d80b448281 select the correct function when fixing its def 2002-07-12 21:14:46 +00:00
Bill Currie
06c03dd074 make local defs always come after global defs in linked qfo files and make
function relocations work better
2002-07-12 20:26:51 +00:00
Bill Currie
24d473c386 more linking fixes 2002-07-12 06:17:24 +00:00
Bill Currie
ce8f071b7c implement partial linking (doesn't work any better than full, though :P) 2002-07-12 04:50:31 +00:00
Bill Currie
33b3fd1887 fix some misc linking bugs 2002-07-12 03:26:47 +00:00
Bill Currie
a9899087d3 fix a bunch of silly bugs and get the linked output written (hangs, though) 2002-07-11 21:04:09 +00:00
Bill Currie
4d1dbc8cc1 re-write qfo writing from progs, make qfo creation easier, (mostly) finish
the linker. now for testing :)
2002-07-11 20:17:26 +00:00
Bill Currie
bc5beea311 getting closer to being able to link 2002-07-11 17:06:15 +00:00
Bill Currie
2df43ef941 make data handling a little easier 2002-07-11 15:42:20 +00:00
Bill Currie
2cb6138f2b fix a silly segfault and make statement allocation saner 2002-07-08 20:31:59 +00:00
Bill Currie
4c8e157db2 nuke pr.statement_linenums as it was redundant and the info never used anyway 2002-07-08 03:05:44 +00:00
Bill Currie
8a402381e6 redo how progs strings are stored so multiple pools can exist 2002-07-05 20:02:10 +00:00
Bill Currie
0ef4a7513d d'oh, I thought I tested with those lines in :/ 2002-07-03 21:38:14 +00:00
Bill Currie
46bad45c7a move s_file, pr_source_line and pr_error_count into pr, make the linker
errors more meaningful, and fix a blasted string.h issue (damn old gcc;P)
2002-07-03 21:32:03 +00:00
Bill Currie
102eab0d84 linker.[ch]:
start working on the linker.
class.[ch]:
	redo class defs so the pointer works (needs relocs still)
obj_file.h:
	add prototype for read_obj_file, QFO_* data access macros and include
	pr_debug.h
type.[ch]:
	separate type system initialisation and recording of the standard types
	so find_type works properly in multiple compilation
def.c:
	don't mark static defs as initialized
expr.c:
	proper class pointer def stuff
immediate.c:
	clean out dead vars/code
obj_file.c:
	allocate space for the line info and bail if the file can't be opened.
qfcc.c:
	register the standard types for each compile pass and start linking the
	files
2002-07-03 20:16:32 +00:00