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

feat(clang): add clang support for riscv64 and aarch64 #77

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Commits on Jul 25, 2024

  1. feat(clang): add llvm/clang support in makefile

    Signed-off-by: Bruno Sa <bruno.vilaca.sa@gmail.com>
    Signed-off-by: David Cerdeira <davidmcerdeira@gmail.com>
    ninolomata authored and DavidMCerdeira committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    1c702f1 View commit details
    Browse the repository at this point in the history
  2. feat(clang): refactor headers generation for clang

    Clang assembler requires valid assembly; otherwise, an error is thrown.
    Instead of using "->" as the token to parse for assembly macro defines,
    we define the tokens "#", which is used for comments in assembly files.
    The generated output will be valid for both clang and gcc.
    
    Signed-off-by: Bruno Sa <bruno.vilaca.sa@gmail.com>
    ninolomata authored and DavidMCerdeira committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    6666cdb View commit details
    Browse the repository at this point in the history
  3. feat(clang): add support for riscv clang

    This commit fixes relocation errors identified by the clang compiler and
    marks the .gtl_page_tables section as no data otherwise there is a type
    mismatch.
    
    Signed-off-by: Bruno Sa <bruno.vilaca.sa@gmail.com>
    ninolomata authored and DavidMCerdeira committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    29beb35 View commit details
    Browse the repository at this point in the history
  4. feat(clang): add support for armv8 clang

    This commit fixes some issues when using clang:
    - remove .directive .func which is not recognized by clang assembler;
    - make gtlb_page_tables as no data to avoid section type mismatch;
    - remove general-regs-only in aarch32 this is not recognized by the
      clang assembler
    - remove mov instructions with flexible second operand since they are
      not recognized by the clang assembler;
    
    Signed-off-by: Bruno Sa <bruno.vilaca.sa@gmail.com>
    Signed-off-by: David Cerdeira <davidmcerdeira@gmail.com>
    DavidMCerdeira committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    b11b413 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2024

  1. feat(flags): Add warning flags to Makefile

    These flags are enabled in Clang compiler by default.
    Adding these flags minimized the discrepancies between GCC and Clang
    
    Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
    miguelafsilva5 committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    36bee04 View commit details
    Browse the repository at this point in the history
  2. feat(missing-void): Add missing void argument to function prototypes

    Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
    miguelafsilva5 committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    1785ca0 View commit details
    Browse the repository at this point in the history
  3. ref(fallthrough): Change the fallthrough annotation to attribute

    Clang compiler only accepts fallthrough annotation to be done using
    attribute(fallthrough). This is can be enforced in gcc using the flag
    -Wimplicit-fallthrough=5
    
    Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
    miguelafsilva5 committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    420eb76 View commit details
    Browse the repository at this point in the history
  4. fix(inline): Fix inline functions

    Both MISRA and clang compiler force inline functions to be static.
    Functions that are used in multiple sources stop being inline because they
    cannot be static.
    The other inline functions become static and their prototype is removed from
    the header
    
    Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
    miguelafsilva5 committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    4d6081e View commit details
    Browse the repository at this point in the history