Package: binfmtc
Version: 0.15-1
Severity: wishlist

File magic was wrong in my version of manpage.
Changed references to C in source and compiler to Fortran.
Changed options back to " -O2 -Wall " to match the rest.

You need to balance compile time with run time.
Is -O2 wise?

You need at least -O for some of the important compile time checks so
-O may be a better option.

These can be given after magic so could also be empty.


/*
 *  binfmt_misc C Interpreter
 *  Copyright (C) 2005 Junichi Uekawa
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Fortran bindings.
 *
 */
#include <stdio.h>
#include <stdlib.h>
#include "binfmtc.h"

const char* gcc_x = " -x f95 ";
const char* language_type = "Fortran 95";
const char* binfmtc_magic="! BINFMTF95:";

const char* compiler_name(void)
{
  return  getenv("GFORTRAN")?:
    "gfortran";
}

const char* default_options(void)
{
  return getenv("BINFMTC_GFORTRAN_OPTS")?:
    " -O2 -Wall ";
}

.TH "binfmtf" 1 "2005 Jun 4" "binfmt_misc Dancer" "binfmt_C"
.SH NAME
binfmtf-interpreter \- binfmt_misc fortran handler
.SH SYNOPSIS
.BI "binfmtf-interpreter " "fortran-source-file-name" " [" "command-line opions 
..." "]"
.SH "DESCRIPTION"
.B "binfmtf-interpreter"
compiles a fortran source file specified on the command-line using 
the gfortran compiler, and executes the resulting file.

It is designed to be used as a handler for 
.B "binfmt_misc"
handler, which is a system used in Linux for handling arbitrary files 
as executables.

The command-line options are passed on to the 
compiled binary.

.SH "FILE MAGIC"

There is a requirement for Fortran source files to have the 
magic characters
.B "! BINFMTF95:"
at the beginning of the file.

That line also is used to specify the additional command-line options
for Fortran compiler.

.SH "ENVIRONMENT"
.TP
.B "GFORTRAN"
The compiler used.
The default is to use
.B "gfortran"

.TP
.B "BINFMTCTMPDIR"

Temporary directory used for binary and execution.

Falls back to 
.B "$TMPDIR" 
.B "$TEMPDIR"
or
.B "/tmp"

.TP
.B "BINFMTC_DEBUG"
enables debug output if set.

.TP
.B "BINFMTC_GFORTRAN_OPTS"
Additional Gfortran options.
Use 
.B "BINFMTC_DEBUG"
to verify the options being passed on to gfortran.

The default is
.B " -O2 -Wall "

.SH "AUTHOR"
Junichi Uekawa ([EMAIL PROTECTED])

Upstream page is available at 
.B "http://www.netfort.gr.jp/~dancer/software/";

.SH "SEE ALSO"
.BR "binfmtc-interpreter" "(1), " 
.BR "binfmtcxx-interpreter" "(1), " 
.BR "binfmtgcj-interpreter" "(1), " 
.BR "binfmtasm-interpreter" "(1)" 

Reply via email to