Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for fortran? #15

Open
edisonchan opened this issue Sep 17, 2023 · 1 comment
Open

support for fortran? #15

edisonchan opened this issue Sep 17, 2023 · 1 comment
Assignees

Comments

@edisonchan
Copy link

./toolchain.py --arch aarch64 --install no --cores 4 --enable-languages={c,c++,fortran}
usage: toolchain.py [-h] -a {aarch64,amd64,arm32,armhf,ia32,ia64,mips32,mips32eb,mips64,ppc32,ppc64,sparc32,sparc64,lm32} -i {yes,no} [-c CORES] [--enable-cxx]
toolchain.py: error: unrecognized arguments: --enable-languages=c --enable-languages=c++ --enable-languages=fortran
edison@vpc:~/Downloads/gcc-cross-compiler$ python ./toolchain.py --arch aarch64 --install no --cores 4 --enable-languages={c,c++,fortran}

how can I enable c,c++,fortran at same time?

@adazem009
Copy link
Contributor

Maybe I'll make another contribution for this, but for now, please edit the toolchain.py file and add the following line into the build_gcc() function:

languages += ',fortran'

For example:

def build_gcc(*args):
    """Build GCC."""

    install, nb_cores, obj_directory, prefix, gcc_directory, target, enable_cxx = args
    languages = 'c'

    if enable_cxx:
        languages += ',cxx'

    languages += ',fortran' # Add this line

    os.chdir(obj_directory)
    ...

@narke narke self-assigned this Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants