Git Product home page Git Product logo

cefi-cmake's Introduction

Hi everyone, I'm Julian (@blitz) ๐Ÿ‘‹. I'm a low-level Rust and C++ developer with 10+ years of experience. I've worked on hypervisors, firmware code, operating systems including microkernels, drivers, and more. In the dark past, I also enjoyed writing Common Lisp.

I have a blog about weird x86 details (and other things that interest me). I co-host the syslog podcast about operating system topics (but it's sleeping right now). I occasionally talk at FOSDEM (1, 2).

Lately, I enjoy building systems with Nix and help with bringing UEFI Secure Boot to NixOS.

I'm happy to collaborate on anything regarding operating systems, Rust, RISC-V, ... I'm eager to learn about quality software engineering and the social side of engineering.

If you want to chat with me, ping me on:

cefi-cmake's People

Contributors

blitz avatar

Watchers

 avatar  avatar  avatar

cefi-cmake's Issues

Need to manually override linker for UEFI build

Nix builds in linker parameters into clang that prevent using clang to link UEFI applications. You can see this when building c2cbc9f (current master):

Scanning dependencies of target cmake-cefi
[ 50%] Building C object CMakeFiles/cmake-cefi.dir/main.c.o
clang-7: warning: argument unused during compilation: '--gcc-toolchain=/nix/store/apcaggi0q3vrb4ha1b07cjxiim2li5ly-gcc-7.4.0' [-Wunused-command-line-argument]
[100%] Linking C executable cmake-cefi
clang-7: warning: argument unused during compilation: '--gcc-toolchain=/nix/store/apcaggi0q3vrb4ha1b07cjxiim2li5ly-gcc-7.4.0' [-Wunused-command-line-argument]
lld-link: warning: ignoring unknown argument: -dynamic-linker
lld-link: warning: ignoring unknown argument: -rpath
lld-link: warning: ignoring unknown argument: -rpath
lld-link: error: /nix/store/c745s6cnnxy6c98bvhi0qsijrh3ikag1-glibc-2.27/lib/ld-linux-x86-64.so.2: unknown file type
lld-link: error: could not open /nix/store/6ck7dzvabkvhd8kd4iwlq622fknl08xy-cefi-cmake-1.0.0/lib64: No such file or directory
lld-link: error: could not open /nix/store/6ck7dzvabkvhd8kd4iwlq622fknl08xy-cefi-cmake-1.0.0/lib: No such file or directory
lld-link: error: could not open libcmt.lib: No such file or directory
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/cmake-cefi.dir/build.make:84: cmake-cefi] Error 1

The current workaround is to convince cmake to link with lld-link directly (see one commit before).

It would be nice to be able to inject the required cmake magic with a toolchain file. Even nicer would be to build this with Nix's built-in cross compilation support (mingw toolchain), but the linker is also very persistent in adding harmful flags there as well.

@tfc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.