How to set the CC environmental variable during debian cross packing

I'm not sure about what is missing on the long run, as OP didn't mention any info about it target package and anyway to check solution my side. Happy to hear your feedback about similar case.

The message is about C Compiler (CC) environment variable is not convenient for the requested target architecture. Try dpkg-cross which may help you set all ENV variables for you.

debuild is a helper that uses dpkg-buildpackage

  1. Install dpkg-cross package

    sudo apt install dpkg-cross build-essential
    
  2. Set the cross-compile config variables and helping flags before building

    set CONFIG_SITE=/etc/dpkg-cross/cross-config.arm64
    set DEB_BUILD_OPTIONS=nocheck
    
  3. Try build it again

If it doesn't work, try passing through debuild the cross-compile options of dpkg-buildpackage. All steps documented in Debian Wiki: Building with dpkg-buildpackage.

Note:

If you are build you own package, good to read how to make your package Debian cross-compile friendly: Guidelines for cross-build friendly packages