This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] guile: Compile and install Scheme files.
- From: Doug Evans <xdje42 at gmail dot com>
- To: ludo at gnu dot org (Ludovic CourtÃs)
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 11 Jul 2014 22:00:51 -0700
- Subject: Re: [PATCH] guile: Compile and install Scheme files.
- Authentication-results: sourceware.org; auth=none
- References: <87bntnl0wt dot fsf at gnu dot org>
ludo@gnu.org (Ludovic CourtÃs) writes:
> This patch compiles Scheme code under data-directory/.
>
> Another option would have been to compile them from gdb/Makefile, and
> then simply copy them to data-directory/. It seemed more consistent to
> handle everything under data-directory/ though. WDYT?
>
> Thanks,
> Ludoâ.
>
> gdb/
> 2014-06-20 Ludovic CourtÃs <ludo@gnu.org>
>
> * acinclude.m4 (GDB_GUILE_PROGRAM_NAMES): New macro.
> * configure.ac ["${have_libguile}" != no]: Use it.
> * configure: Regenerate.
> * data-directory/Makefile.in (GUILE_FILES): Rename to...
> (GUILE_SOURCE_FILES): ... this. New variable.
> (GUILE_COMPILED_FILES): New variable.
> (GUILE_FILES, GUILD, GUILD_COMPILE_FLAGS, COMPILE_SCM_FILE)
> (.SUFFIXES): New variables.
> (stamp-guile): Depend on $(GUILE_SOURCE_FILES). Build all of
> $(GUILE_SOURCE_FILES) with $(COMPILE_SCM_FILE).
> * guile/guile.c (boot_guile_support, handle_boot_error): New
> functions.
> (initialize_scheme_side): Use them and 'scm_c_catch' in lieu of
> 'gdbscm_safe_source_script'.
> * guile/lib/gdb.scm: Remove 'add-to-load-path' call.
> * guile/lib/boot.scm: Augment '%load-path' and
> '%load-compiled-path'. Remove 'load' call, and use
> 'load-compiled' for 'gdb.go'.
> * guile/lib/init.scm (%initialize): Remove 'add-to-load-path'
> call.
Hi.
I couldn't get this to work with guile 2.0.5.
The -L flag to guild compile doesn't seem to work.
Can you give it a try? Maybe I was doing something wrong.
My main concern is handling cross builds (build != host).
I haven't tried it yet, but we should before this patch goes in.
I don't mind not compiling the files in that case for the time being.
If the current patch only works for native builds (does it?),
can we provide a script that compiles all the files and
run it from gdb? Then the build could use that, and we
could ship it for use with cross builds (to be available to be
run as part of a post-installation step). WDYT?