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 #77

Merged
merged 11 commits into from
Sep 18, 2024
Merged

Commits on Sep 18, 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 josecm committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    f21dcd1 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 josecm committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    5b60a34 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 josecm committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    f9bc0b6 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 authored and josecm committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    85a7c03 View commit details
    Browse the repository at this point in the history
  5. 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 authored and josecm committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    f703bcc View commit details
    Browse the repository at this point in the history
  6. feat(missing-void): Add missing void argument to function prototypes

    Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
    miguelafsilva5 authored and josecm committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    09dfd7b View commit details
    Browse the repository at this point in the history
  7. 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 authored and josecm committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    bb65113 View commit details
    Browse the repository at this point in the history
  8. 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 authored and josecm committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    9121e83 View commit details
    Browse the repository at this point in the history
  9. ref(core): refactor ipi_cpumsg_handler_size calculation

    The way this size was being calculated using the linker generated a
    linking error when targetting risc-v.
    
    Signed-off-by: Jose Martins <josemartins90@gmail.com>
    josecm committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    7ecc78f View commit details
    Browse the repository at this point in the history
  10. fix(zynq_uart): add missing parenthesis on ambigous condition

    Signed-off-by: Jose Martins <josemartins90@gmail.com>
    josecm committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    1fdbbb2 View commit details
    Browse the repository at this point in the history
  11. feat(ci/actions): add clang build

    Signed-off-by: Jose Martins <josemartins90@gmail.com>
    josecm committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    d812ff3 View commit details
    Browse the repository at this point in the history