[Tex/LaTex] \overset and align environment: how to get correct alignment

align

I'm using the align environment together with the \overset command to put some text over a relation symbol. Here is my MWE:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{amsmath}

\begin{document}
\begin{align*}
f(x)&=g(x)\\
    &\overset{something}{=} h(x)
\end{align*}
\end{document}

And the output is

wrong alignment

As you can see the alignment is wrong, or at least is not what I want! I would like the two equal signs to be aligned one to the other, while with my code I get the alignment of the first equal sign with the start of the text over the symbol!

I've already tried with

\overset{something}{&=} h(x)

and

\overset{something}&{=} h(x)

but both solutions led to an error.

How can I get the correct alignment?

Edit: the original question was about \buildrel, but, as @egreg said in a comment, this command is not supported in LaTeX, so I've substituted it with \overset.

Best Answer

The aligned-overset package now provides an easy solution for this: Just write

\documentclass{article}
...
\usepackage{aligned-overset}
\begin{document}
\begin{align*}
  f(x)&=g(x)\\
  \overset{something}&{=} h(x)
\end{align*}
\end{document}

Corresponding output