Skip to content

0.43 doesn't build with clang-13 #41

Open
@riesebie

Description

@riesebie

Is it possible to build tp-smapi with clang? I am running a clang built kernel 5.15.3. tp-smapi build fails with:

DKMS make.log for tp_smapi-0.43 for kernel 5.15.3-galadriel-lxtec-amd64 (x86_64)
2021-11-20T16:46:57 CET
make: Entering directory '/usr/src/linux-5.15.3'
   CC [M]  /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.o                                                                                                                                                                                   
   LTO [M] /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.lto.o                                                                                                                                                                               
   CC [M]  /var/lib/dkms/tp_smapi/0.43/build/tp_smapi.o
/var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c:202:14: error: invalid use of a cast in a inline asm context requiring an lvalue: remove the cast or build with -fheinous-gnu-extensions                                                       
                           "m"((u16)smapi_port)                                                                                                                                                                                               
                               ~~~~~^~~~~~~~~~                                                                                                                                                                                                
  1 error generated.                                                                                                                                                                                                                          
  make[1]: *** [scripts/Makefile.build:277: /var/lib/dkms/tp_smapi/0.43/build/tp_smapi.o] Error 1                                                                                                                                             
  make: *** [Makefile:1871: /var/lib/dkms/tp_smapi/0.43/build] Error 2                                                                                                                                                                        
  make: Leaving directory '/usr/src/linux-5.15.3'

Same is with 5.14.20

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions