This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Build rpcgen-generated files when cross compiling


My inclination is still to do this with generic variables/rules.
The existing native-compile cases can be converted to use the same
machinery, so we have only one place where the decisions about
compiling for the build host are kept.

> +cross-rpcgen-objs = $(addprefix $(objpfx)cross-,$(rpcgen-objs))

Actually, it's better for this to be := since it's unconditionally used
right away.

> +$(cross-rpcgen-objs): $(objpfx)cross-%.o: %.c
> +	$(make-target-directory)
> +	$(BUILD_CC) $< -c -D_GNU_SOURCE $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) \
> +		-DIS_IN_build $(OUTPUT_OPTION) $(compile-mkdep-flags)

There should never be -D switches directly in a rule like this.
They all ought to be in some variable.


Thanks,
Roland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]